Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# uts/sparc/ses/Makefile
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This makefile drives the production of the ses driver kernel module.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# sparc architecture dependent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Path to the base of the uts directory tree (usually /usr/src/uts).
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUTSBASE = ../..
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Define the module and object file sets.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinMODULE = ses
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinOBJECTS = $(SES_OBJS:%=$(OBJS_DIR)/%)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTS = $(SES_OBJS:%.o=$(LINTS_DIR)/%.ln)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWARLOCK_OUT = $(SES_OBJS:%.o=%.ll)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWARLOCK_OK = $(MODULE).ok
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Include common rules.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(UTSBASE)/sparc/Makefile.sparc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Define targets
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinALL_TARGET = $(BINARY) $(SRC_CONFILE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINT_TARGET = $(MODULE).lint
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCLEANFILES += $(WARLOCK_TARGETS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# For now, disable these lint checks; maintainers should endeavor
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# to investigate and remove these for maximum lint coverage.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Please do not carry these forward to new Makefiles.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Default build targets.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.KEEP_STATE:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chindef: $(DEF_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinall: $(ALL_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinclean: $(CLEAN_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinclean: $(CLEAN_DEPS); \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinclobber: $(CLOBBER_DEPS); \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinmodlintlib: $(MODLINTLIB_DEPS) lint64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinclean.lint: $(CLEAN_LINT_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininstall: $(INSTALL_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Include common targets.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(UTSBASE)/sparc/Makefile.targ
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Defines for local commands.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWARLOCK = warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWLCC = wlcc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTOUCH = touch
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinSCCS = sccs
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTEST = test
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Warlock targets
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinSES_FILES = $(MODULE).ll
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWARLOCK_TARGETS = warlock.ok warlock_with_esp.ok warlock_with_fas.ok \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin warlock_with_isp.ok warlock_with_glm.ok
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinwarlock: $(WARLOCK_TARGETS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinwarlock.ok: $(MODULE).wlcmd $(SES_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../warlock; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../scsi; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(WARLOCK) -c ./$(MODULE).wlcmd $(SES_FILES) ../warlock/scsi.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin -l ../warlock/ddi_dki_impl.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(SCSI_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @ $(TOUCH) $@
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinwarlock_with_esp.ok: ses_with_esp.wlcmd $(SES_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../warlock; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../scsi; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../esp; $(MAKE) warlock;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(WARLOCK) -c ./ses_with_esp.wlcmd $(SES_FILES) ../esp/esp \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ../warlock/scsi.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin -l ../warlock/ddi_dki_impl.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(SCSI_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @ $(TOUCH) $@
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinwarlock_with_fas.ok: ses_with_fas.wlcmd $(SES_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../warlock; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../scsi; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../fas; $(MAKE) warlock;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(WARLOCK) -c ./ses_with_fas.wlcmd $(SES_FILES) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ../fas/fas ../fas/fas_callbacks \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ../warlock/scsi.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin -l ../warlock/ddi_dki_impl.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(SCSI_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @ $(TOUCH) $@
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinwarlock_with_isp.ok: ses_with_isp.wlcmd $(SES_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../warlock; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../scsi; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd $(CLOSED)/uts/sparc/isp; $(MAKE) warlock;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(WARLOCK) -c ./ses_with_isp.wlcmd $(SES_FILES) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(CLOSED)/uts/sparc/isp/isp \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ../warlock/scsi.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin -l ../warlock/ddi_dki_impl.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(SCSI_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @ $(TOUCH) $@
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinwarlock_with_glm.ok: ses_with_glm.wlcmd $(SES_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../warlock; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd ../scsi; $(MAKE) warlock
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @cd $(CLOSED)/uts/sparc/glm; $(MAKE) warlock;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(WARLOCK) -c ./ses_with_glm.wlcmd $(SES_FILES) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(CLOSED)/uts/sparc/glm/glm \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ../warlock/scsi.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin -l ../warlock/ddi_dki_impl.ll \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(SCSI_FILES)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin @ $(TOUCH) $@
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(WLCC) $(CPPFLAGS) -o $@ $<
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin