Makefile revision bf56214c0556fa6864189c826d39dbe156bb22a0
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User#
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# CDDL HEADER START
7a2a1b8b14fc804ac80612d7b98064095e445be5Automatic Updater#
7a42357217528037bdfedcb17eeebfe96ae4266aAutomatic Updater# The contents of this file are subject to the terms of the
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater# Common Development and Distribution License (the "License").
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# You may not use this file except in compliance with the License.
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater#
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater# or http://www.opensolaris.org/os/licensing.
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews# See the License for the specific language governing permissions
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User# When distributing Covered Code, include this CDDL HEADER in each
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# If applicable, add the following below this CDDL HEADER, with the
1ac49378a458420bc685293d12e567d7222d17b6Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# CDDL HEADER END
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# uts/sparc/st/Makefile
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
a01aa536188bb3535dfc1107a623e6355a8e6b7cMark Andrews# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
89623368b8f662d458d9964b923050f33c5f75b0Tinderbox User# Use is subject to license terms.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#ident "%Z%%M% %I% %E% SMI"
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# This makefile drives the production of the st driver kernel module.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# sparc architecture dependent
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# Path to the base of the uts directory tree (usually /usr/src/uts).
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntUTSBASE = ../..
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Define the module and object file sets.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterMODULE = st
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterOBJECTS = $(ST_OBJS:%=$(OBJS_DIR)/%)
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntLINTS = $(ST_OBJS:%.o=$(LINTS_DIR)/%.ln)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic UpdaterROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic UpdaterCONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntWARLOCK_OUT = $(ST_OBJS:%.o=%.ll)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserWARLOCK_OK = $(MODULE).ok
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterWLCMD_DIR = $(UTSBASE)/common/io/warlock
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# Include common rules.
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterinclude $(UTSBASE)/sparc/Makefile.sparc
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Define targets
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews#
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsALL_TARGET = $(BINARY) $(SRC_CONFILE)
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsLINT_TARGET = $(MODULE).lint
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# lint pass one enforcement
8e9f3b69914ee02a80b87c97b1f8093edb3e9ae0Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += $(CCVERBOSE)
a80993946f29ff39df38818ee9b2e58a4e46cb7eTinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c59750de3ea3c7d5890000fb4606e8f5835a52aaTinderbox User# For now, disable these lint checks; maintainers should endeavor
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater# to investigate and remove these for maximum lint coverage.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Please do not carry these forward to new Makefiles.
ec7751119a08c6a7250f3187beed69a8b836d349Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
114f7780384371121918624ae2c80ecfce545683Tinderbox UserLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic UpdaterLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Default build targets.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater.KEEP_STATE:
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterall: $(ALL_DEPS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterdef: $(DEF_DEPS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonclean: $(CLEAN_DEPS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrewsclobber: $(CLOBBER_DEPS)
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userlint: $(LINT_DEPS)
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontmodlintlib: $(MODLINTLIB_DEPS)
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userclean.lint: $(CLEAN_LINT_DEPS)
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinstall: $(INSTALL_DEPS)
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User# Include common targets.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.targ
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater#
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# Defines for local commands.
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews#
7500521cecdff3c00e594ec41d3a17292332ffbcTinderbox UserWARLOCK = warlock
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic UpdaterWLCC = wlcc
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsTOUCH = touch
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsTEST = test
a01aa536188bb3535dfc1107a623e6355a8e6b7cMark Andrews
89623368b8f662d458d9964b923050f33c5f75b0Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Warlock targets
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews#
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews# Note that in warlock_with_{esp,isp} it is important to load st.ll
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews# before {isp,esp}.ll; the reason is that both have _init/_info/_fini
01a5c5503482fb3ba52088bf0178a7213273bf96Mark Andrews# and warlock can only handle one extern function by a given name;
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews# any loaded after the first are ignored.
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterWARLOCK_TARGETS = warlock_alone warlock_with_esp warlock_with_fas
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater$(CLOSED_BUILD)WARLOCK_TARGETS += warlock_with_isp warlock_with_glm
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterwarlock: $(WARLOCK_TARGETS)
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterwarlock_alone: $(WARLOCK_OK)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonwarlock_with_esp: $(WLCMD_DIR)/st_with_esp.wlcmd $(WARLOCK_OUT) scsi_files \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater esp_files warlock_ddi.files
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews $(WARLOCK) -c $(WLCMD_DIR)/st_with_esp.wlcmd \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(WARLOCK_OUT) ../esp/esp $(SCSI_FILES) \
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater -l ../warlock/ddi_dki_impl.ll
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updaterwarlock_with_fas: $(WLCMD_DIR)/st_with_fas.wlcmd $(WARLOCK_OUT) scsi_files \
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater fas_files warlock_ddi.files
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater $(WARLOCK) -c $(WLCMD_DIR)/st_with_fas.wlcmd \
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater $(WARLOCK_OUT) \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater ../fas/fas ../fas/fas_callbacks \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(SCSI_FILES) \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater -l ../warlock/ddi_dki_impl.ll
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox Userwarlock_with_isp: $(WLCMD_DIR)/st_with_isp.wlcmd $(WARLOCK_OUT) scsi_files \
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User isp_files warlock_ddi.files
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User $(WARLOCK) -c $(WLCMD_DIR)/st_with_isp.wlcmd \
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User $(WARLOCK_OUT) $(CLOSED)/uts/sparc/isp/isp $(SCSI_FILES) \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User -l ../warlock/ddi_dki_impl.ll
f132a836c4e386b1af045dd8fe7106ae61b90bffAutomatic Updater
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updaterwarlock_with_glm: $(WLCMD_DIR)/st_with_glm.wlcmd $(WARLOCK_OUT) scsi_files \
c6a0f4ae1d7183a16ffb196b86b647f870694796Automatic Updater glm_files warlock_ddi.files
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater $(WARLOCK) -c $(WLCMD_DIR)/st_with_glm.wlcmd \
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User $(WARLOCK_OUT) $(CLOSED)/uts/sparc/glm/glm $(SCSI_FILES) \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User -l ../warlock/ddi_dki_impl.ll
269519eeb959d905ed125f96426e01d725c3b597Tinderbox User
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updaterscsi_files:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @cd ../scsi; pwd; $(MAKE) warlock
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updateresp_files:
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater @cd ../esp; pwd; $(MAKE) warlock
4e0e18467f8ec5a9e5d0c538ce46bf07409ecf9bTinderbox User
e85565067cf73f8cc21ee29b11761659f1d47ee9Automatic Updaterfas_files:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @cd ../fas; pwd; $(MAKE) warlock
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterisp_files:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @cd $(CLOSED)/uts/sparc/isp; pwd; $(MAKE) warlock
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterglm_files:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @cd $(CLOSED)/uts/sparc/glm; pwd; $(MAKE) warlock
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updaterst.ok: $(WLCMD_DIR)/st.wlcmd st.ll st_conf.ll scsi_files warlock_ddi.files
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(WARLOCK) -c $(WLCMD_DIR)/st.wlcmd $(WARLOCK_OUT) $(SCSI_FILES) \
3f616e6f846be57b1717c6beaba0f74de9d5a7c6Automatic Updater -l ../warlock/ddi_dki_impl.ll
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater $(TOUCH) $@
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater%.ll: $(UTSBASE)/common/io/scsi/targets/%.c
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updaterwarlock_ddi.files:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @cd ../warlock; pwd; $(MAKE) warlock
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
5ecad47f69b3fd945472ab2900a9ff826a7ce2f6Automatic Updaterscsi.files:
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater @cd ../scsi; pwd; $(MAKE) warlock
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater