Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
280a8a0544b4aeb52414d20e8c6e6c5b1108562eTinderbox User#
59602f2a7c4e4809941583bed3e94cd26e628f1aTinderbox User# CDDL HEADER START
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#
5affecff6e148a8e124d03f5dbac0da11e30dcc5Tinderbox User# The contents of this file are subject to the terms of the
19558a04decde0e7261d489d92d04ad88104217bTinderbox User# Common Development and Distribution License (the "License").
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# You may not use this file except in compliance with the License.
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews#
c57668a2fbbe558c1bd21652813616f2f517c469Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User# or http://www.opensolaris.org/os/licensing.
f4ee48be3994797a8332b86c101db4d7b54799ceTinderbox User# See the License for the specific language governing permissions
a2c370ca12bb0360ff7e969474ead3f788c65fffTinderbox User# and limitations under the License.
8de3f14f1c300c3e1ed99084cc03485b42c92bf1Tinderbox User#
e5a6871cd0635ecdb2bf792316a2d8c53206f4b2Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
950d203b64f512b85fcc093ee1e9e3e531a1aea3Tinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont# information: Portions Copyright [yyyy] [name of copyright owner]
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews#
d5637bdbb931ff79fced3d4858d83212ea58ed15Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Use is subject to license terms.
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont#
d5637bdbb931ff79fced3d4858d83212ea58ed15Tinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# This makefile drives the production of the ibmf kernel module.
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# intel architecture dependent
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User#
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsUTSBASE = ../..
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Define the module and object file sets.
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsMODULE = ibmf
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserOBJECTS = $(IBMF_OBJS:%=$(OBJS_DIR)/%)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsLINTS = $(IBMF_OBJS:%.o=$(LINTS_DIR)/%.ln)
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsLDFLAGS += -dy -Nmisc/ibtl
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox UserWARLOCK_OUT = $(IBMF_OBJS:%.o=%.ll)
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox UserWARLOCK_OK = $(MODULE).ok
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntWLCMD_DIR = $(UTSBASE)/common/io/warlock
dc238a06bffa79de141ee7655765e2df91498a8aTinderbox User#
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# Include common rules.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterinclude $(UTSBASE)/intel/Makefile.intel
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Define targets
dc238a06bffa79de141ee7655765e2df91498a8aTinderbox User#
827f8cccb5280f4da66c46186e792d1cb9d73503Mark AndrewsALL_TARGET = $(BINARY)
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntLINT_TARGET = $(MODULE).lint
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Overrides
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews#
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews#DEBUG_DEFS_DBG32 += -DTNF_DEBUG
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# lint pass one enforcement
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCFLAGS += $(CCVERBOSE)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# For now, disable these lint checks; maintainers should endeavor
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# to investigate and remove these for maximum lint coverage.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Please do not carry these forward to new Makefiles.
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCERRWARN += -_gcc=-Wno-uninitialized
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User#
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark Andrews# Default build targets.
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews#
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews.KEEP_STATE:
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark Andrews
2ae159b376dac23870d8005563c585acf85a4b5aEvan Huntdef: $(DEF_DEPS)
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt
2ae159b376dac23870d8005563c585acf85a4b5aEvan Huntall: $(ALL_DEPS)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Huntclean: $(CLEAN_DEPS)
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
7cc0a5d21ef046bfd630c4769943d896a7d7472cTinderbox User
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox Userclobber: $(CLOBBER_DEPS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox User
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox Userlint: $(LINT_DEPS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox Usermodlintlib: $(MODLINTLIB_DEPS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox Userclean.lint: $(CLEAN_LINT_DEPS)
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinstall: $(INSTALL_DEPS)
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox User# Include common targets.
aef6cf0f147a5014d4891c9689b9f463399e16e7Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude $(UTSBASE)/intel/Makefile.targ
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Defines for local commands.
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews#
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntWLCC = wlcc
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsTOUCH = touch
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserWARLOCK = warlock
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsTEST = test
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Warlock targets
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonwarlock: $(WARLOCK_OK)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/ibmf.wlcmd
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt $(WARLOCK) -c $(WLCMD_DIR)/ibmf.wlcmd $(WARLOCK_OUT) \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews -l ../warlock/ddi_dki_impl.ll
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User $(TOUCH) $@
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User%.ll: $(UTSBASE)/common/io/ib/mgt/ibmf/%.c
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews $(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewswarlock_ddi.files:
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews @cd ../warlock; pwd; $(MAKE) warlock
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User