Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
337d121aa0049cbd0ae664f5d1c431d862f1d49ejim#
ec79b29695b183f794264bbb578c51e93d1f9b1emartin# CDDL HEADER START
6aa2272cc4af77e605ba2c4a4781f8567408b7e3pquerna#
ee508128c414648982d1cca7801f63b01a0a4f8aminfrin# The contents of this file are subject to the terms of the
ce26c909953968ede7c5097e508d37b2fa91ea3arpluem# Common Development and Distribution License (the "License").
ce26c909953968ede7c5097e508d37b2fa91ea3arpluem# You may not use this file except in compliance with the License.
ce26c909953968ede7c5097e508d37b2fa91ea3arpluem#
ce26c909953968ede7c5097e508d37b2fa91ea3arpluem# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ce26c909953968ede7c5097e508d37b2fa91ea3arpluem# or http://www.opensolaris.org/os/licensing.
c7eeb0a294d58c75aee6ed86f73c6e1e8cf600a3rpluem# See the License for the specific language governing permissions
c7eeb0a294d58c75aee6ed86f73c6e1e8cf600a3rpluem# and limitations under the License.
c7eeb0a294d58c75aee6ed86f73c6e1e8cf600a3rpluem#
9a60abfb324ea66f9d7089b856f315efeb7056b4trawick# When distributing Covered Code, include this CDDL HEADER in each
9a60abfb324ea66f9d7089b856f315efeb7056b4trawick# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9a60abfb324ea66f9d7089b856f315efeb7056b4trawick# If applicable, add the following below this CDDL HEADER, with the
9a60abfb324ea66f9d7089b856f315efeb7056b4trawick# fields enclosed by brackets "[]" replaced with your own identifying
686ce4eade942e515b1725d0c9751da36b759a6ctrawick# information: Portions Copyright [yyyy] [name of copyright owner]
686ce4eade942e515b1725d0c9751da36b759a6ctrawick#
686ce4eade942e515b1725d0c9751da36b759a6ctrawick# CDDL HEADER END
1ce78cf71b5baaf2c1ab48e818cb1f2397df5010trawick#
886f0852a0b7e9f0b6414b157ea9dc403d282e3erpluem# uts/intel/io/sd/Makefile
886f0852a0b7e9f0b6414b157ea9dc403d282e3erpluem#
886f0852a0b7e9f0b6414b157ea9dc403d282e3erpluem# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
886f0852a0b7e9f0b6414b157ea9dc403d282e3erpluem# Use is subject to license terms.
fafad9231a6b47368d4b690346f90698542caa50trawick# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
fafad9231a6b47368d4b690346f90698542caa50trawick#
fafad9231a6b47368d4b690346f90698542caa50trawick# This makefile drives the production of the sd
b1bb7fe353e0f1759febb0c67e517195137275d3rpluem# kernel module.
b1bb7fe353e0f1759febb0c67e517195137275d3rpluem#
b1bb7fe353e0f1759febb0c67e517195137275d3rpluem#
b1bb7fe353e0f1759febb0c67e517195137275d3rpluem
b1bb7fe353e0f1759febb0c67e517195137275d3rpluem#
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisd# Path to the base of the uts directory tree (usually /usr/src/uts).
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisd#
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisdUTSBASE = ../..
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisd
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisd#
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisd# Define the module and object file sets.
4bd465052c4a0c8d41e573ee7a90c312d980355fchrisd#
c3c8103039e36494987aff50451896459826a361rpluemMODULE = sd
a71dbbcb4f19f6b1d19a45defcd3ed1988d9db56niqOBJECTS = $(SD_OBJS:%=$(OBJS_DIR)/%)
a71dbbcb4f19f6b1d19a45defcd3ed1988d9db56niqLINTS = $(SD_OBJS:%.o=$(LINTS_DIR)/%.ln)
27b38d4191d5f638165e2a77ec6e6f567bd7784dniqROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
27b38d4191d5f638165e2a77ec6e6f567bd7784dniqCONF_SRCDIR = $(UTSBASE)/intel/io/scsi/targets
27b38d4191d5f638165e2a77ec6e6f567bd7784dniqWARLOCK_OUT = $(SD_OBJS:%.o=%.ll)
a87e2a23083aa62229307482afbb3b802a0c2105mturkWARLOCK_OK = $(MODULE).ok
a87e2a23083aa62229307482afbb3b802a0c2105mturkWLCMD_DIR = $(UTSBASE)/common/io/warlock
a87e2a23083aa62229307482afbb3b802a0c2105mturk
a87e2a23083aa62229307482afbb3b802a0c2105mturk#
a87e2a23083aa62229307482afbb3b802a0c2105mturk# Include common rules.
a87e2a23083aa62229307482afbb3b802a0c2105mturk#
6d8d07c0167960873d449b217da08faab50c410dmjcinclude $(UTSBASE)/intel/Makefile.intel
6d8d07c0167960873d449b217da08faab50c410dmjc
6d8d07c0167960873d449b217da08faab50c410dmjc#
6d8d07c0167960873d449b217da08faab50c410dmjc# Define targets
6d8d07c0167960873d449b217da08faab50c410dmjc#
6d8d07c0167960873d449b217da08faab50c410dmjcALL_TARGET = $(BINARY) $(CONFMOD)
260825f41ee3fb517a5c5ecd675f5f58de9ea0b7rpluemLINT_TARGET = $(MODULE).lint
260825f41ee3fb517a5c5ecd675f5f58de9ea0b7rpluemINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
260825f41ee3fb517a5c5ecd675f5f58de9ea0b7rpluem
260825f41ee3fb517a5c5ecd675f5f58de9ea0b7rpluem#
188befd3a49e3a126bd801d7dc5a7f6e63ad4332mturk# Overrides.
188befd3a49e3a126bd801d7dc5a7f6e63ad4332mturk#
188befd3a49e3a126bd801d7dc5a7f6e63ad4332mturkDEBUG_FLGS =
188befd3a49e3a126bd801d7dc5a7f6e63ad4332mturkDEBUG_DEFS += $(DEBUG_FLGS)
188befd3a49e3a126bd801d7dc5a7f6e63ad4332mturk
188befd3a49e3a126bd801d7dc5a7f6e63ad4332mturkINC_PATH += -I$(UTSBASE)/intel/io/scsi/targets
8fd638698262130d00458b2c95548f6f94875847rpluem
534611d341a1a48b93c7a1fd5e333dbd261527d3rpluem#
534611d341a1a48b93c7a1fd5e333dbd261527d3rpluem# For now, disable these lint checks; maintainers should endeavor
534611d341a1a48b93c7a1fd5e333dbd261527d3rpluem# to investigate and remove these for maximum lint coverage.
e99dfd55d29a7b4209b814efc7270d0b74ccee74niq# Please do not carry these forward to new Makefiles.
c3c8103039e36494987aff50451896459826a361rpluem#
e99dfd55d29a7b4209b814efc7270d0b74ccee74niqLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
127aef4ce9f7b6b32a95c5ed9a93b796d18755e6rpluemLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
127aef4ce9f7b6b32a95c5ed9a93b796d18755e6rpluemLINTTAGS += -erroff=E_STATIC_UNUSED
127aef4ce9f7b6b32a95c5ed9a93b796d18755e6rpluemLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
127aef4ce9f7b6b32a95c5ed9a93b796d18755e6rpluemLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
62a2cea4c337100e330fd31c786c5323de2ff1a2rpluem
62a2cea4c337100e330fd31c786c5323de2ff1a2rpluemCERRWARN += -_gcc=-Wno-unused-variable
62a2cea4c337100e330fd31c786c5323de2ff1a2rpluemCERRWARN += -_gcc=-Wno-unused-function
62a2cea4c337100e330fd31c786c5323de2ff1a2rpluemCERRWARN += -_gcc=-Wno-unused-label
88a69c2c895d959ba4120a8ccaddfe603d6ee2c0wroweCERRWARN += -_gcc=-Wno-parentheses
c3c8103039e36494987aff50451896459826a361rpluemCERRWARN += -_gcc=-Wno-type-limits
88a69c2c895d959ba4120a8ccaddfe603d6ee2c0wroweCERRWARN += -_gcc=-Wno-uninitialized
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe#
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe# Depends on scsi and cmlb
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe#
7aa189407cc993c97b31167201319a9ab2e1715ewroweLDFLAGS += -dy -N misc/scsi -N misc/cmlb
7aa189407cc993c97b31167201319a9ab2e1715ewrowe
7aa189407cc993c97b31167201319a9ab2e1715ewrowe#
7e5a8c14bf68438e4098f74999e154d157e33eb7wrowe# Default build targets.
7e5a8c14bf68438e4098f74999e154d157e33eb7wrowe#
192f4f9ad53487b74228b2bc410947375d69f4dfwrowe.KEEP_STATE:
79d4b708d021714647aab8b138ae671ed24765cewrowe
79d4b708d021714647aab8b138ae671ed24765cewrowedef: $(DEF_DEPS)
79d4b708d021714647aab8b138ae671ed24765cewrowe
79d4b708d021714647aab8b138ae671ed24765cewroweall: $(ALL_DEPS)
79d4b708d021714647aab8b138ae671ed24765cewrowe
79d4b708d021714647aab8b138ae671ed24765cewroweclean: $(CLEAN_DEPS)
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluem $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluem
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluemclobber: $(CLOBBER_DEPS)
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluem $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
15264721069299ec26493e21d56bf8ff7faf6f0drpluem
15264721069299ec26493e21d56bf8ff7faf6f0drpluemlint: $(LINT_DEPS)
15264721069299ec26493e21d56bf8ff7faf6f0drpluem
11e1b16b907afb7de0678e28fe4849d9029e2df8rpluemmodlintlib: $(MODLINTLIB_DEPS)
25a81ea1bca1c89cda713c4d23660e487b1488a0rpluem
25a81ea1bca1c89cda713c4d23660e487b1488a0rpluemclean.lint: $(CLEAN_LINT_DEPS)
25a81ea1bca1c89cda713c4d23660e487b1488a0rpluem
48fa058fe468025347930610ac2473094fa0f4e4chrisdinstall: $(INSTALL_DEPS)
48fa058fe468025347930610ac2473094fa0f4e4chrisd
48fa058fe468025347930610ac2473094fa0f4e4chrisd#
3ec4328f079d8867cc323155e59678ad9437914frooneg# Include common targets.
3ec4328f079d8867cc323155e59678ad9437914frooneg#
3ec4328f079d8867cc323155e59678ad9437914frooneginclude $(UTSBASE)/intel/Makefile.targ
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd#
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# Defines for local commands.
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd#
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisdWARLOCK = warlock
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisdWLCC = wlcc
cd59ac5e8f739afbdcd523c649550f7dce1709ceniqTOUCH = touch
db78659055df54243bca678c35bd2ce7e31a9237roonegTEST = test
edf6757df85878dc8ce11fb3840ee4cde6de5b2frooneg
db78659055df54243bca678c35bd2ce7e31a9237rooneg#
95817edd05387a5276f51fcd5db79fc21b89b55brooneg# Warlock targets
95817edd05387a5276f51fcd5db79fc21b89b55brooneg#
95817edd05387a5276f51fcd5db79fc21b89b55brooneg# Note that in warlock_with_{esp,isp} it is important to load sd.ll
63689d77e084e36b8194fb6df5adfc0344965e01trawick# before {isp,esp}.ll; the reason is that both have _init/_info/_fini
63689d77e084e36b8194fb6df5adfc0344965e01trawick# and warlock can only handle one extern function by a given name;
63689d77e084e36b8194fb6df5adfc0344965e01trawick# any loaded after the first are ignored.
63689d77e084e36b8194fb6df5adfc0344965e01trawick
5714cdd83e23557d801437daa5e3ab8ba78ae595jortonSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
5714cdd83e23557d801437daa5e3ab8ba78ae595jortonCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
5714cdd83e23557d801437daa5e3ab8ba78ae595jorton
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesWARLOCK_TARGETS = warlock_alone
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes$(CLOSED_BUILD)WARLOCK_TARGETS += warlock_with_mpt warlock_with_glm
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholeswarlock: $(WARLOCK_TARGETS)
a1a615ca49b162d71d88089210395c9a9cfeb539rpluem
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholeswarlock_alone: $(WARLOCK_OK)
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes$(WARLOCK_OK): $(WLCMD_DIR)/sd.wlcmd $(WARLOCK_OUT) scsi_files \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes warlock_ddi.files cmlb_files
a1a615ca49b162d71d88089210395c9a9cfeb539rpluem $(WARLOCK) -c $(WLCMD_DIR)/sd.wlcmd $(WARLOCK_OUT) $(SCSI_FILES) \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(CMLB_FILES) \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes -l ../warlock/ddi_dki_impl.ll
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(TOUCH) $@
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
a1a615ca49b162d71d88089210395c9a9cfeb539rpluem%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholeswarlock_with_glm: $(WLCMD_DIR)/sd_with_glm.wlcmd $(WARLOCK_OUT) scsi_files \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes glm_files warlock_ddi.files cmlb_files
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(WARLOCK) -c $(WLCMD_DIR)/sd_with_glm.wlcmd \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(WARLOCK_OUT) \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(CLOSED)/uts/intel/glm/*.ll \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(SCSI_FILES) $(CMLB_FILES) \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes -l ../warlock/ddi_dki_impl.ll
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholeswarlock_with_mpt: $(WLCMD_DIR)/sd_with_mpt.wlcmd $(WARLOCK_OUT) scsi_files \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes mpt_files warlock_ddi.files cmlb_files
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(WARLOCK) -c $(WLCMD_DIR)/sd_with_mpt.wlcmd \
a1a615ca49b162d71d88089210395c9a9cfeb539rpluem $(WARLOCK_OUT) \
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluem $(CLOSED)/uts/intel/mpt/*.ll \
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluem $(SCSI_FILES) $(CMLB_FILES) \
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluem -l ../warlock/ddi_dki_impl.ll
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluem
edc5389f50ce4153e6192740f3c7a188c8cf8d67niqglm_files:
edc5389f50ce4153e6192740f3c7a188c8cf8d67niq @cd $(CLOSED)/uts/intel/glm; pwd; $(MAKE) warlock
6c05afd314b4ddd545d63b4ff5de822cc30eec79trawick
6c05afd314b4ddd545d63b4ff5de822cc30eec79trawickmpt_files:
6c05afd314b4ddd545d63b4ff5de822cc30eec79trawick @cd $(CLOSED)/uts/intel/mpt; pwd; $(MAKE) warlock
13cd67e9c1dacbd6b9f040bda337c725cedd98f3brianp
13cd67e9c1dacbd6b9f040bda337c725cedd98f3brianpcmlb_files:
a623efbff95aab78da9e030524b0fa69b054f6d0brianp @cd ../cmlb; pwd; $(MAKE) warlock
a623efbff95aab78da9e030524b0fa69b054f6d0brianp
a623efbff95aab78da9e030524b0fa69b054f6d0brianpscsi_files:
a623efbff95aab78da9e030524b0fa69b054f6d0brianp @cd ../scsi; pwd; $(MAKE) warlock
a623efbff95aab78da9e030524b0fa69b054f6d0brianp
a623efbff95aab78da9e030524b0fa69b054f6d0brianpwarlock_ddi.files:
0b4b04d8621478ba59f0a6ba2950ddc02ab92b58colm @cd ../warlock; pwd; $(MAKE) warlock
0b4b04d8621478ba59f0a6ba2950ddc02ab92b58colm