Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The contents of this file are subject to the terms of the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Common Development and Distribution License (the "License").
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens# or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens# and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens# information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# uts/sparc/st/Makefile
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Use is subject to license terms.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ident "%Z%%M% %I% %E% SMI"
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# This makefile drives the production of the st driver kernel module.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# sparc architecture dependent
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Path to the base of the uts directory tree (usually /usr/src/uts).
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrensUTSBASE = ../..
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Define the module and object file sets.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrensMODULE = st
fa9e4066f08beec538e775443c5be79dd423fcabahrensOBJECTS = $(ST_OBJS:%=$(OBJS_DIR)/%)
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINTS = $(ST_OBJS:%.o=$(LINTS_DIR)/%.ln)
fa9e4066f08beec538e775443c5be79dd423fcabahrensROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
fa9e4066f08beec538e775443c5be79dd423fcabahrensCONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
fa9e4066f08beec538e775443c5be79dd423fcabahrensWARLOCK_OUT = $(ST_OBJS:%.o=%.ll)
fa9e4066f08beec538e775443c5be79dd423fcabahrensWARLOCK_OK = $(MODULE).ok
fa9e4066f08beec538e775443c5be79dd423fcabahrensWLCMD_DIR = $(UTSBASE)/common/io/warlock
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Include common rules.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude $(UTSBASE)/sparc/Makefile.sparc
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Define targets
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrensALL_TARGET = $(BINARY) $(SRC_CONFILE)
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINT_TARGET = $(MODULE).lint
fa9e4066f08beec538e775443c5be79dd423fcabahrensINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# lint pass one enforcement
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrensCFLAGS += $(CCVERBOSE)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# For now, disable these lint checks; maintainers should endeavor
fa9e4066f08beec538e775443c5be79dd423fcabahrens# to investigate and remove these for maximum lint coverage.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Please do not carry these forward to new Makefiles.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Default build targets.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens.KEEP_STATE:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensall: $(ALL_DEPS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensdef: $(DEF_DEPS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensclean: $(CLEAN_DEPS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensclobber: $(CLOBBER_DEPS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenslint: $(LINT_DEPS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensmodlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
SCCS = sccs
TEST = test
#
# Warlock targets
#
# Note that in warlock_with_{esp,isp} it is important to load st.ll
# before {isp,esp}.ll; the reason is that both have _init/_info/_fini
# and warlock can only handle one extern function by a given name;
# any loaded after the first are ignored.
SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
warlock: warlock_alone warlock_with_esp warlock_with_isp warlock_with_fas \
warlock_with_glm
warlock_alone: $(WARLOCK_OK)
%.wlcmd:
cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
warlock_with_esp: st_with_esp.wlcmd $(WARLOCK_OUT) scsi_files esp_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/st_with_esp.wlcmd \
$(WARLOCK_OUT) ../esp/esp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_fas: st_with_fas.wlcmd $(WARLOCK_OUT) scsi_files fas_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/st_with_fas.wlcmd \
$(WARLOCK_OUT) \
../fas/fas ../fas/fas_callbacks \
$(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_isp: st_with_isp.wlcmd $(WARLOCK_OUT) scsi_files isp_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/st_with_isp.wlcmd \
$(WARLOCK_OUT) $(CLOSED)/uts/sparc/isp/isp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_glm: st_with_glm.wlcmd $(WARLOCK_OUT) scsi_files glm_files \
warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/st_with_glm.wlcmd \
$(WARLOCK_OUT) $(CLOSED)/uts/sparc/glm/glm $(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
st.ok: st.wlcmd st.ll st_conf.ll scsi_files warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/st.wlcmd $(WARLOCK_OUT) $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock
scsi.files:
@cd ../scsi; pwd; $(MAKE) warlock