Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
235N/A#
235N/A# CDDL HEADER START
235N/A#
235N/A# The contents of this file are subject to the terms of the
235N/A# Common Development and Distribution License (the "License").
235N/A# You may not use this file except in compliance with the License.
235N/A#
235N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
235N/A# or http://www.opensolaris.org/os/licensing.
235N/A# See the License for the specific language governing permissions
235N/A# and limitations under the License.
235N/A#
235N/A# When distributing Covered Code, include this CDDL HEADER in each
235N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
235N/A# If applicable, add the following below this CDDL HEADER, with the
235N/A# fields enclosed by brackets "[]" replaced with your own identifying
235N/A# information: Portions Copyright [yyyy] [name of copyright owner]
235N/A#
235N/A# CDDL HEADER END
235N/A#
235N/A# uts/intel/io/sd/Makefile
235N/A#
235N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
235N/A# Use is subject to license terms.
235N/A# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
235N/A#
235N/A# This makefile drives the production of the sd
235N/A# kernel module.
235N/A#
235N/A#
235N/A
235N/A#
235N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
247N/A#
235N/AUTSBASE = ../..
235N/A
235N/A#
235N/A# Define the module and object file sets.
235N/A#
235N/AMODULE = sd
235N/AOBJECTS = $(SD_OBJS:%=$(OBJS_DIR)/%)
235N/ALINTS = $(SD_OBJS:%.o=$(LINTS_DIR)/%.ln)
235N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
235N/ACONF_SRCDIR = $(UTSBASE)/intel/io/scsi/targets
235N/AWARLOCK_OUT = $(SD_OBJS:%.o=%.ll)
235N/AWARLOCK_OK = $(MODULE).ok
235N/AWLCMD_DIR = $(UTSBASE)/common/io/warlock
235N/A
235N/A#
235N/A# Include common rules.
235N/A#
235N/Ainclude $(UTSBASE)/intel/Makefile.intel
235N/A
235N/A#
235N/A# Define targets
235N/A#
235N/AALL_TARGET = $(BINARY) $(CONFMOD)
235N/ALINT_TARGET = $(MODULE).lint
235N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
235N/A
235N/A#
235N/A# Overrides.
235N/A#
235N/ADEBUG_FLGS =
235N/ADEBUG_DEFS += $(DEBUG_FLGS)
235N/A
235N/AINC_PATH += -I$(UTSBASE)/intel/io/scsi/targets
235N/A
235N/A#
235N/A# For now, disable these lint checks; maintainers should endeavor
235N/A# to investigate and remove these for maximum lint coverage.
235N/A# Please do not carry these forward to new Makefiles.
235N/A#
235N/ALINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
235N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
235N/ALINTTAGS += -erroff=E_STATIC_UNUSED
235N/ALINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
235N/ALINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
235N/A
235N/ACERRWARN += -_gcc=-Wno-unused-variable
235N/ACERRWARN += -_gcc=-Wno-unused-function
235N/ACERRWARN += -_gcc=-Wno-unused-label
235N/ACERRWARN += -_gcc=-Wno-parentheses
235N/ACERRWARN += -_gcc=-Wno-type-limits
235N/ACERRWARN += -_gcc=-Wno-uninitialized
247N/A
247N/A#
247N/A# Depends on scsi and cmlb
235N/A#
247N/ALDFLAGS += -dy -N misc/scsi -N misc/cmlb
247N/A
235N/A#
235N/A# Default build targets.
241N/A#
241N/A.KEEP_STATE:
235N/A
235N/Adef: $(DEF_DEPS)
235N/A
235N/Aall: $(ALL_DEPS)
235N/A
235N/Aclean: $(CLEAN_DEPS)
235N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
235N/A
235N/Aclobber: $(CLOBBER_DEPS)
235N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
235N/A
235N/Alint: $(LINT_DEPS)
235N/A
235N/Amodlintlib: $(MODLINTLIB_DEPS)
235N/A
235N/Aclean.lint: $(CLEAN_LINT_DEPS)
235N/A
235N/Ainstall: $(INSTALL_DEPS)
235N/A
235N/A#
235N/A# Include common targets.
235N/A#
235N/Ainclude $(UTSBASE)/intel/Makefile.targ
235N/A
235N/A
235N/A#
235N/A# Defines for local commands.
235N/A#
235N/AWARLOCK = warlock
235N/AWLCC = wlcc
235N/ATOUCH = touch
235N/ATEST = test
235N/A
235N/A#
235N/A# Warlock targets
235N/A#
235N/A# Note that in warlock_with_{esp,isp} it is important to load sd.ll
235N/A# before {isp,esp}.ll; the reason is that both have _init/_info/_fini
235N/A# and warlock can only handle one extern function by a given name;
235N/A# any loaded after the first are ignored.
235N/A
235N/ASCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
235N/ACMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
235N/A
235N/AWARLOCK_TARGETS = warlock_alone
235N/A$(CLOSED_BUILD)WARLOCK_TARGETS += warlock_with_mpt warlock_with_glm
235N/A
235N/Awarlock: $(WARLOCK_TARGETS)
235N/A
247N/Awarlock_alone: $(WARLOCK_OK)
247N/A
247N/A$(WARLOCK_OK): $(WLCMD_DIR)/sd.wlcmd $(WARLOCK_OUT) scsi_files \
247N/A warlock_ddi.files cmlb_files
247N/A $(WARLOCK) -c $(WLCMD_DIR)/sd.wlcmd $(WARLOCK_OUT) $(SCSI_FILES) \
247N/A $(CMLB_FILES) \
247N/A -l ../warlock/ddi_dki_impl.ll
247N/A $(TOUCH) $@
235N/A
235N/A%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
235N/A $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
235N/A
235N/Awarlock_with_glm: $(WLCMD_DIR)/sd_with_glm.wlcmd $(WARLOCK_OUT) scsi_files \
235N/A glm_files warlock_ddi.files cmlb_files
235N/A $(WARLOCK) -c $(WLCMD_DIR)/sd_with_glm.wlcmd \
235N/A $(WARLOCK_OUT) \
235N/A $(CLOSED)/uts/intel/glm/*.ll \
235N/A $(SCSI_FILES) $(CMLB_FILES) \
235N/A -l ../warlock/ddi_dki_impl.ll
235N/A
235N/Awarlock_with_mpt: $(WLCMD_DIR)/sd_with_mpt.wlcmd $(WARLOCK_OUT) scsi_files \
241N/A mpt_files warlock_ddi.files cmlb_files
235N/A $(WARLOCK) -c $(WLCMD_DIR)/sd_with_mpt.wlcmd \
235N/A $(WARLOCK_OUT) \
235N/A $(CLOSED)/uts/intel/mpt/*.ll \
235N/A $(SCSI_FILES) $(CMLB_FILES) \
235N/A -l ../warlock/ddi_dki_impl.ll
235N/A
235N/Aglm_files:
235N/A @cd $(CLOSED)/uts/intel/glm; pwd; $(MAKE) warlock
235N/A
235N/Ampt_files:
235N/A @cd $(CLOSED)/uts/intel/mpt; pwd; $(MAKE) warlock
235N/A
235N/Acmlb_files:
235N/A @cd ../cmlb; pwd; $(MAKE) warlock
235N/A
235N/Ascsi_files:
235N/A @cd ../scsi; pwd; $(MAKE) warlock
235N/A
235N/Awarlock_ddi.files:
235N/A @cd ../warlock; pwd; $(MAKE) warlock
235N/A