Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
341N/A#
341N/A# CDDL HEADER START
341N/A#
341N/A# The contents of this file are subject to the terms of the
341N/A# Common Development and Distribution License (the "License").
341N/A# You may not use this file except in compliance with the License.
341N/A#
341N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
341N/A# or http://www.opensolaris.org/os/licensing.
341N/A# See the License for the specific language governing permissions
341N/A# and limitations under the License.
341N/A#
341N/A# When distributing Covered Code, include this CDDL HEADER in each
341N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
341N/A# If applicable, add the following below this CDDL HEADER, with the
341N/A# fields enclosed by brackets "[]" replaced with your own identifying
341N/A# information: Portions Copyright [yyyy] [name of copyright owner]
341N/A#
341N/A# CDDL HEADER END
341N/A#
341N/A#
341N/A# uts/sparc/sd/Makefile
341N/A#
341N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
341N/A# Use is subject to license terms.
341N/A#
341N/A#ident "%Z%%M% %I% %E% SMI"
341N/A#
341N/A# This makefile drives the production of the sd driver kernel module.
341N/A#
341N/A# sparc architecture dependent
341N/A#
422N/A
341N/A#
341N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
341N/A#
341N/AUTSBASE = ../..
341N/A
341N/A#
341N/A# Define the module and object file sets.
341N/A#
341N/AMODULE = sd
341N/AOBJECTS = $(SD_OBJS:%=$(OBJS_DIR)/%)
341N/ALINTS = $(SD_OBJS:%.o=$(LINTS_DIR)/%.ln)
341N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
341N/ACONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
341N/AWARLOCK_OUT = $(SD_OBJS:%.o=%.ll)
341N/AWARLOCK_OK = $(MODULE).ok
341N/AWLCMD_DIR = $(UTSBASE)/common/io/warlock
341N/A
341N/A#
341N/A# Include common rules.
341N/A#
341N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
341N/A
341N/A#
341N/A# Define targets
392N/A#
396N/AALL_TARGET = $(BINARY) $(SRC_CONFILE)
409N/ALINT_TARGET = $(MODULE).lint
422N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
422N/A
341N/A#
341N/A# lint pass one enforcement
341N/A#
341N/ACFLAGS += $(CCVERBOSE)
341N/A
341N/A#
341N/A# For now, disable these lint checks; maintainers should endeavor
341N/A# to investigate and remove these for maximum lint coverage.
341N/A# Please do not carry these forward to new Makefiles.
341N/A#
341N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
341N/ALINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
341N/ALINTTAGS += -erroff=E_STATIC_UNUSED
341N/ALINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
341N/A
341N/A#
341N/A# Default build targets.
341N/A#
341N/A.KEEP_STATE:
341N/A
341N/Aall: $(ALL_DEPS)
341N/A
341N/Adef: $(DEF_DEPS)
341N/A
341N/Aclean: $(CLEAN_DEPS)
341N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
341N/A
341N/Aclobber: $(CLOBBER_DEPS)
341N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
341N/A
341N/Alint: $(LINT_DEPS)
341N/A
341N/Amodlintlib: $(MODLINTLIB_DEPS)
341N/A
341N/Aclean.lint: $(CLEAN_LINT_DEPS)
341N/A
341N/Ainstall: $(INSTALL_DEPS)
341N/A
341N/A#
341N/A# Include common targets.
341N/A#
341N/Ainclude $(UTSBASE)/sparc/Makefile.targ
341N/A
341N/A
341N/A#
341N/A# Defines for local commands.
341N/A#
341N/AWARLOCK = warlock
341N/AWLCC = wlcc
341N/ATOUCH = touch
341N/ASCCS = sccs
341N/ATEST = test
341N/A
341N/A#
341N/A# Warlock targets
341N/A#
341N/A# Note that in warlock_with_{esp,isp} it is important to load sd.ll
341N/A# before {isp,esp}.ll; the reason is that both have _init/_info/_fini
341N/A# and warlock can only handle one extern function by a given name;
341N/A# any loaded after the first are ignored.
341N/A
341N/ASCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
341N/A
341N/Awarlock: warlock_alone warlock_with_esp warlock_with_isp warlock_with_fas \
341N/A warlock_with_glm warlock_with_uata warlock_with_mpt
341N/A
341N/Awarlock_alone: $(WARLOCK_OK)
341N/A
341N/A%.wlcmd:
341N/A cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
$(WARLOCK_OK): sd.wlcmd $(WARLOCK_OUT) scsi_files warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd.wlcmd $(WARLOCK_OUT) $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_with_esp: sd_with_esp.wlcmd $(WARLOCK_OUT) scsi_files esp_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd_with_esp.wlcmd \
$(WARLOCK_OUT) ../esp/esp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_fas: sd_with_fas.wlcmd $(WARLOCK_OUT) scsi_files fas_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd_with_fas.wlcmd \
$(WARLOCK_OUT) ../fas/fas \
../fas/fas_callbacks \
$(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_isp: sd_with_isp.wlcmd $(WARLOCK_OUT) scsi_files isp_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd_with_isp.wlcmd \
$(WARLOCK_OUT) $(CLOSED)/uts/sparc/isp/isp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_glm: sd_with_glm.wlcmd $(WARLOCK_OUT) scsi_files glm_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd_with_glm.wlcmd \
$(WARLOCK_OUT) $(CLOSED)/uts/sparc/glm/glm $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_uata: sd_with_uata.wlcmd $(WARLOCK_OUT) scsi_files uata_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd_with_uata.wlcmd \
$(WARLOCK_OUT) $(CLOSED)/uts/sparc/uata/*.ll $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_mpt: sd_with_mpt.wlcmd $(WARLOCK_OUT) scsi_files mpt_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/sd_with_mpt.wlcmd \
$(WARLOCK_OUT) $(CLOSED)/uts/sparc/mpt/*.ll $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
scsi_files:
@cd ../scsi; pwd; $(MAKE) warlock
esp_files:
@cd ../esp; pwd; $(MAKE) warlock
fas_files:
@cd ../fas; pwd; $(MAKE) warlock
isp_files:
@cd $(CLOSED)/uts/sparc/isp; pwd; $(MAKE) warlock
glm_files:
@cd $(CLOSED)/uts/sparc/glm; pwd; $(MAKE) warlock
uata_files:
@cd $(CLOSED)/uts/sparc/uata; pwd; $(MAKE) warlock
mpt_files:
@cd $(CLOSED)/uts/sparc/mpt; pwd; $(MAKE) warlock
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock