Makefile revision bf56214c0556fa6864189c826d39dbe156bb22a0
f690123c15ce847b78eb68ba842a94c88a8e5529Michael Graff#
c8175ece69d986ccd0671bc4d2571b247dfae177Automatic Updater# CDDL HEADER START
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# The contents of this file are subject to the terms of the
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# Common Development and Distribution License (the "License").
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# You may not use this file except in compliance with the License.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# or http://www.opensolaris.org/os/licensing.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# See the License for the specific language governing permissions
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# and limitations under the License.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# When distributing Covered Code, include this CDDL HEADER in each
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# If applicable, add the following below this CDDL HEADER, with the
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
f85aab2e1a371d4575eaaf03bf926c116b4c791eAndreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#
271c4c7ffafeb0bda21278af6cac4535c0193f18Automatic Updater# CDDL HEADER END
f690123c15ce847b78eb68ba842a94c88a8e5529Michael Graff#
f690123c15ce847b78eb68ba842a94c88a8e5529Michael Graff#
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Use is subject to license terms.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# uts/sparc/usbser/Makefile
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#ident "%Z%%M% %I% %E% SMI"
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
f690123c15ce847b78eb68ba842a94c88a8e5529Michael Graff# This makefile drives the production of the usbser kernel module.
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington#
cf39976b894c5aa6079a85076bfd46f91a9419a2Francis Dupont#
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# Path to the base of the uts directory tree (usually /usr/src/uts).
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid LawrenceUTSBASE = ../..
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington#
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington# Define the module and object file sets.
253f774e358dba38742a484426a4cadf4f248817Brian Wellington#
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian WellingtonMODULE = usbser
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian WellingtonOBJECTS = $(USBSER_OBJS:%=$(OBJS_DIR)/%)
6098d364b690cb9dabf96e9664c4689c8559bd2eMark AndrewsLINTS = $(USBSER_OBJS:%.o=$(LINTS_DIR)/%.ln)
6a759e38699d133302d0df120d7afcd4af721951David LawrenceWARLOCK_OUT = $(USBSER_OBJS:%.o=%.ll)
79d91e915023ffa5fac1bb2f91f19210bb18407cBrian WellingtonWARLOCK_OK = $(MODULE).ok
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian WellingtonROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE)
bb74e8ce7bb324ef248d029b2b6ba293ac9403f3Brian WellingtonWLCMD_DIR = $(UTSBASE)/common/io/warlock
40e7c805a8f38ad9b20dd6c688496fc09fc971c2Mark Andrews
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington# Include common rules.
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington#
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellingtoninclude $(UTSBASE)/sparc/Makefile.sparc
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews
6e8a8077faf96d8da0b6cf738913f5f1f86e4008Mark Andrews#
2534a73a5914470f7ffe00663b6bbaff5e411e57Mark Andrews# lint pass one enforcement
b0c15bd9792112fb47f6d956e580e4369e92f4e7Mark Andrews#
e8892697f98b9154cd390c13205b75d1f038fd4dBrian WellingtonCFLAGS += $(CCVERBOSE)
1879dbe0d962f6f929417b02bf07f64ed41b1aabFrancis Dupont
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington# depends on misc/usba
acc63b06d9e4e2137950dabddcccd17d8b336ca0Olafur Gudmundsson#
6098d364b690cb9dabf96e9664c4689c8559bd2eMark AndrewsLDFLAGS += -dy -Nmisc/usba
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington#
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington# Define targets
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington#
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid LawrenceALL_TARGET = $(BINARY)
0b09763c354ec91fb352b6b4cea383bd0195b2d8Mark AndrewsLINT_TARGET = $(MODULE).lint
90fc267992241a9d6adcae478666726d23c97326David LawrenceINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence#
e8892697f98b9154cd390c13205b75d1f038fd4dBrian Wellington# For now, disable these lint checks; maintainers should endeavor
e8892697f98b9154cd390c13205b75d1f038fd4dBrian Wellington# to investigate and remove these for maximum lint coverage.
93d6dfaf66258337985427c86181f01fc51f0bb4Mark Andrews# Please do not carry these forward to new Makefiles.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian WellingtonLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
6098d364b690cb9dabf96e9664c4689c8559bd2eMark AndrewsLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington
1f8f904ad612e372bf34d88fce28c59ac5e54574Brian Wellington.KEEP_STATE:
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington
49f7148b1e61fc383c7d41081ca48b1255a0c143Brian Wellingtonall: $(ALL_DEPS)
a67fc7e1ff1e39ebf5e58a77b2ee413615ff1ff3Brian Wellington
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellingtondef: $(DEF_DEPS)
6ed53e5949d9fcd9715b440015b56e5a896d63dfDavid Hankins
bf5582ad4b2b464539059fba2806b546ec3c5caaBrian Wellingtonclean: $(CLEAN_DEPS)
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellington $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
b1d234eb75e2804e09d89178a76df39c321db51bBrian Wellington
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian Wellingtonclobber: $(CLOBBER_DEPS)
b1d234eb75e2804e09d89178a76df39c321db51bBrian Wellington $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
b1d234eb75e2804e09d89178a76df39c321db51bBrian Wellington
9edd523c2295757f1e1c5e93ea369cae892f0754Evan Huntlint: $(LINT_DEPS)
9edd523c2295757f1e1c5e93ea369cae892f0754Evan Hunt
9edd523c2295757f1e1c5e93ea369cae892f0754Evan Huntmodlintlib: $(MODLINTLIB_DEPS)
9edd523c2295757f1e1c5e93ea369cae892f0754Evan Hunt
7efc8c3f692fc3226c00ce8bdc1b90eb06562352David Lawrenceclean.lint: $(CLEAN_LINT_DEPS)
b1d234eb75e2804e09d89178a76df39c321db51bBrian Wellington
3de75141d2e042a1db4c58b397ea4fc905cecf6eBrian Wellingtoninstall: $(INSTALL_DEPS)
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews# Include common targets.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrewsinclude $(UTSBASE)/sparc/Makefile.targ
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#
3727725bb7d63605b68a644060857013d563b67fEvan Hunt# Defines for local commands.
3727725bb7d63605b68a644060857013d563b67fEvan Hunt#
bf5582ad4b2b464539059fba2806b546ec3c5caaBrian WellingtonWLCC = wlcc
0b09763c354ec91fb352b6b4cea383bd0195b2d8Mark AndrewsTOUCH = touch
f104fbbe4e868a039ed786c0087c0412ab6dd923Brian WellingtonWARLOCK = warlock
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian WellingtonTEST = test
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington#
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington# Warlock
6ed53e5949d9fcd9715b440015b56e5a896d63dfDavid Hankins#
6ed53e5949d9fcd9715b440015b56e5a896d63dfDavid HankinsWARLOCK_CMD = $(WLCMD_DIR)/$(MODULE).wlcmd
6ed53e5949d9fcd9715b440015b56e5a896d63dfDavid Hankins
6ed53e5949d9fcd9715b440015b56e5a896d63dfDavid Hankinswarlock: $(WARLOCK_OK)
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington$(WARLOCK_OK): $(WARLOCK_OUT) $(WARLOCK_CMD) warlock_ddi.files
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington -l ../warlock/ddi_dki_impl.ll
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington $(TOUCH) $@
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington
c9d7e543d0da2996d1cc52d3c5920141df49a4ecBrian Wellington%.ll: $(UTSBASE)/common/io/usb/clients/usbser/%.c
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
66f5b00c37e17ffaa829b82afb8549bca21f80e1Brian Wellington
2534a73a5914470f7ffe00663b6bbaff5e411e57Mark Andrewswarlock_ddi.files:
61271cdee65f3313e98f382b07e6674861d9020aEvan Hunt cd ../warlock; pwd; $(MAKE) warlock
2b71493ae644557c48a906f889ef50127f418b17Brian Wellington