Makefile revision d291d9f21e8c0417aec99de243dd48bc400002d0
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# CDDL HEADER START
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# The contents of this file are subject to the terms of the
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Common Development and Distribution License, Version 1.0 only
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# (the "License"). You may not use this file except in compliance
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# with the License.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# or http://www.opensolaris.org/os/licensing.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# See the License for the specific language governing permissions
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# and limitations under the License.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# When distributing Covered Code, include this CDDL HEADER in each
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# If applicable, add the following below this CDDL HEADER, with the
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# fields enclosed by brackets "[]" replaced with your own identifying
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# information: Portions Copyright [yyyy] [name of copyright owner]
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# CDDL HEADER END
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# uts/sparc/ses/Makefile
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Use is subject to license terms.
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#ident "%Z%%M% %I% %E% SMI"
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# This makefile drives the production of the ses driver kernel module.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# sparc architecture dependent
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Path to the base of the uts directory tree (usually /usr/src/uts).
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusUTSBASE = ../..
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Define the module and object file sets.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusMODULE = ses
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusOBJECTS = $(SES_OBJS:%=$(OBJS_DIR)/%)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusLINTS = $(SES_OBJS:%.o=$(LINTS_DIR)/%.ln)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusCONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusWARLOCK_OUT = $(SES_OBJS:%.o=%.ll)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusWARLOCK_OK = $(MODULE).ok
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe# Include common rules.
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusinclude $(UTSBASE)/sparc/Makefile.sparc
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Define targets
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusALL_TARGET = $(BINARY) $(SRC_CONFILE)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusLINT_TARGET = $(MODULE).lint
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusCLEANFILES += $(WARLOCK_TARGETS)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus# Default build targets.
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus#
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus.KEEP_STATE:
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusdef: $(DEF_DEPS)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusall: $(ALL_DEPS)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusclean: $(CLEAN_DEPS)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusclean: $(CLEAN_DEPS); \
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusclobber: $(CLOBBER_DEPS); \
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusmodlintlib: $(MODLINTLIB_DEPS) lint64
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusclean.lint: $(CLEAN_LINT_DEPS)
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutus
8e50dcc9f00b393d43e6aa42b820bcbf1d3e1ce4brutusinstall: $(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
#
SES_FILES = $(MODULE).ll
SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
WARLOCK_TARGETS = warlock.ok warlock_with_esp.ok warlock_with_fas.ok \
warlock_with_isp.ok warlock_with_glm.ok
warlock: $(WARLOCK_TARGETS)
warlock.ok: $(MODULE).wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
$(WARLOCK) -c ./$(MODULE).wlcmd $(SES_FILES) ../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
@ $(TOUCH) $@
warlock_with_esp.ok: ses_with_esp.wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
@cd ../esp; $(MAKE) warlock;
$(WARLOCK) -c ./ses_with_esp.wlcmd $(SES_FILES) ../esp/esp \
../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
@ $(TOUCH) $@
warlock_with_fas.ok: ses_with_fas.wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
@cd ../fas; $(MAKE) warlock;
$(WARLOCK) -c ./ses_with_fas.wlcmd $(SES_FILES) \
../fas/fas ../fas/fas_callbacks \
../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
@ $(TOUCH) $@
warlock_with_isp.ok: ses_with_isp.wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
@cd ../isp; $(MAKE) warlock;
$(WARLOCK) -c ./ses_with_isp.wlcmd $(SES_FILES) ../isp/isp \
../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
@ $(TOUCH) $@
warlock_with_glm.ok: ses_with_glm.wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
@cd ../glm; $(MAKE) warlock;
$(WARLOCK) -c ./ses_with_glm.wlcmd $(SES_FILES) ../glm/glm \
../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
@ $(TOUCH) $@
%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
$(WLCC) $(CPPFLAGS) -o $@ $<