Makefile revision fb9f9b975cb9214fec5dab37d461199adab9b964
653N/A#
653N/A# CDDL HEADER START
653N/A#
653N/A# The contents of this file are subject to the terms of the
653N/A# Common Development and Distribution License (the "License").
810N/A# You may not use this file except in compliance with the License.
653N/A#
653N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
653N/A# or http://www.opensolaris.org/os/licensing.
653N/A# See the License for the specific language governing permissions
653N/A# and limitations under the License.
653N/A#
653N/A# When distributing Covered Code, include this CDDL HEADER in each
653N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
653N/A# If applicable, add the following below this CDDL HEADER, with the
653N/A# fields enclosed by brackets "[]" replaced with your own identifying
653N/A# information: Portions Copyright [yyyy] [name of copyright owner]
653N/A#
653N/A# CDDL HEADER END
653N/A#
653N/A# uts/sparc/st/Makefile
653N/A#
653N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
653N/A# Use is subject to license terms.
653N/A#
653N/A#ident "%Z%%M% %I% %E% SMI"
653N/A#
653N/A# This makefile drives the production of the st driver kernel module.
653N/A#
653N/A# sparc architecture dependent
653N/A#
653N/A
810N/A#
653N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
653N/A#
653N/AUTSBASE = ../..
653N/A
653N/A#
653N/A# Define the module and object file sets.
653N/A#
653N/AMODULE = st
653N/AOBJECTS = $(ST_OBJS:%=$(OBJS_DIR)/%)
653N/ALINTS = $(ST_OBJS:%.o=$(LINTS_DIR)/%.ln)
653N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
653N/ACONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
653N/AWARLOCK_OUT = $(ST_OBJS:%.o=%.ll)
653N/AWARLOCK_OK = $(MODULE).ok
653N/A
653N/A#
653N/A# Include common rules.
653N/A#
653N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
653N/A
653N/A#
653N/A# Define targets
653N/A#
653N/AALL_TARGET = $(BINARY) $(SRC_CONFILE)
810N/ALINT_TARGET = $(MODULE).lint
810N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
810N/A
810N/A#
653N/A# lint pass one enforcement
653N/A#
653N/ACFLAGS += $(CCVERBOSE)
653N/A
653N/A#
653N/A# Default build targets.
653N/A#
653N/A.KEEP_STATE:
653N/A
653N/Aall: $(ALL_DEPS)
653N/A
653N/Adef: $(DEF_DEPS)
653N/A
653N/Aclean: $(CLEAN_DEPS); \
653N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
653N/A
653N/Aclobber: $(CLOBBER_DEPS); \
653N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
653N/A
653N/Alint: $(LINT_DEPS)
653N/A
653N/Amodlintlib: $(MODLINTLIB_DEPS)
653N/A
653N/Aclean.lint: $(CLEAN_LINT_DEPS)
653N/A
653N/Ainstall: $(INSTALL_DEPS)
653N/A
653N/A# Include common targets.
653N/A#
653N/Ainclude $(UTSBASE)/sparc/Makefile.targ
653N/A
653N/A#
653N/A# Defines for local commands.
653N/A#
653N/AWARLOCK = warlock
653N/AWLCC = wlcc
653N/ATOUCH = touch
653N/ASCCS = sccs
653N/ATEST = test
653N/A
653N/A#
# 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)
ST_FILES = $(ST_OBJS:%.o=%.ll)
warlock: warlock_alone warlock_with_esp warlock_with_isp warlock_with_fas \
warlock_with_glm
warlock_alone: $(MODULE).ok
%.wlcmd:
$(TEST) -f $@ || $(SCCS) get $@
warlock_with_esp: st_with_esp.wlcmd $(ST_FILES) scsi_files esp_files \
warlock_ddi.files
$(WARLOCK) -c ./st_with_esp.wlcmd \
$(ST_FILES) ../esp/esp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_fas: st_with_fas.wlcmd $(ST_FILES) scsi_files fas_files \
warlock_ddi.files
$(WARLOCK) -c ./st_with_fas.wlcmd \
$(ST_FILES) \
../fas/fas ../fas/fas_callbacks \
$(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_isp: st_with_isp.wlcmd $(ST_FILES) scsi_files isp_files \
warlock_ddi.files
$(WARLOCK) -c ./st_with_isp.wlcmd \
$(ST_FILES) $(CLOSED)/uts/sparc/isp/isp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_glm: st_with_glm.wlcmd $(ST_FILES) scsi_files glm_files \
warlock_ddi.files
$(WARLOCK) -c ./st_with_glm.wlcmd \
$(ST_FILES) $(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 ./st.wlcmd $(ST_FILES) $(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