Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#
5cd4555ad444fd391002ae32450572054369fd42Rob Austein# CDDL HEADER START
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# The contents of this file are subject to the terms of the
dde8659175c5798267fb0fdefd7576e4efe271b3Automatic Updater# Common Development and Distribution License (the "License").
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# You may not use this file except in compliance with the License.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# or http://www.opensolaris.org/os/licensing.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# See the License for the specific language governing permissions
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# CDDL HEADER END
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews#
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt#
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Use is subject to license terms.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#ident "%Z%%M% %I% %E% SMI"
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Path to the base of the uts directory tree.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonUTSBASE = ../..
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Define the module and object file sets.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonMODULE = av1394
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonOBJECTS = $(AV1394_OBJS:%=$(OBJS_DIR)/%)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLINTS = $(AV1394_OBJS:%.o=$(LINTS_DIR)/%.ln)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinWARLOCK_OUT = $(AV1394_OBJS:%.o=%.ll)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinWARLOCK_OK = $(MODULE).ok
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark AndrewsWLCMD_DIR = $(UTSBASE)/common/io/warlock
3398334b3acda24b086957286288ca9852662b12Automatic Updater
dde8659175c5798267fb0fdefd7576e4efe271b3Automatic Updater#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Include common rules.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(UTSBASE)/sparc/Makefile.sparc
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Define targets
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark AndrewsALL_TARGET = $(BINARY)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLINT_TARGET = $(MODULE).lint
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Overrides
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
b272d38cc5d24f64c0647a9afb340c21c4b9aaf7Evan HuntALL_BUILDS = $(ALL_BUILDSONLY64)
b272d38cc5d24f64c0647a9afb340c21c4b9aaf7Evan HuntDEF_BUILDS = $(DEF_BUILDSONLY64)
b272d38cc5d24f64c0647a9afb340c21c4b9aaf7Evan HuntCLEANLINTFILES += $(LINT32_FILES)
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntDEBUG_DEFS_DBG32 += -DTNF_DEBUG
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntDEBUG_DEFS_DBG64 += -DTNF_DEBUG
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# lint pass one enforcement
b0c15bd9792112fb47f6d956e580e4369e92f4e7Mark Andrews#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonCFLAGS += $(CCVERBOSE)
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
cc3aafe737334d444781f8a34ffaf459e075bb9aMark Andrews# For now, disable these lint checks; maintainers should endeavor
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt# to investigate and remove these for maximum lint coverage.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Please do not carry these forward to new Makefiles.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntLINTTAGS += -erroff=E_STATIC_UNUSED
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington#
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# depends on misc/s1394
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonLDFLAGS += -dy -Nmisc/s1394
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Default build targets.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein.KEEP_STATE:
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Huntdef: $(DEF_DEPS)
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonall: $(ALL_DEPS)
41eeb37b516d1bac073781b6ec50a39a669987dfEvan Hunt
41eeb37b516d1bac073781b6ec50a39a669987dfEvan Huntclean: $(CLEAN_DEPS)
41eeb37b516d1bac073781b6ec50a39a669987dfEvan Hunt $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
41eeb37b516d1bac073781b6ec50a39a669987dfEvan Hunt
41eeb37b516d1bac073781b6ec50a39a669987dfEvan Huntclobber: $(CLOBBER_DEPS)
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonlint: $(LINT_DEPS)
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonmodlintlib: $(MODLINTLIB_DEPS) lint32
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonclean.lint: $(CLEAN_LINT_DEPS)
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininstall: $(INSTALL_DEPS)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt# Include common targets.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Huntinclude $(UTSBASE)/sparc/Makefile.targ
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt# Defines for local commands.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt#
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntWARLOCK = warlock
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntWLCC = wlcc
553ead32ff5b00284e574dcabc39115d4d74ec66Evan HuntTOUCH = touch
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinSCCS = sccs
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTEST = test
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews# Warlock targets
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinwarlock: $(WARLOCK_OK)
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt%.wlcmd:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files av1394.wlcmd
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington $(WARLOCK) -c $(WLCMD_DIR)/av1394.wlcmd $(WARLOCK_OUT) \
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington -l ../warlock/ddi_dki_impl.ll
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington $(TOUCH) $@
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein%.ll: $(UTSBASE)/common/io/1394/targets/av1394/%.c
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
b272d38cc5d24f64c0647a9afb340c21c4b9aaf7Evan Huntwarlock_ddi.files:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein @cd ../warlock; pwd; $(MAKE) warlock
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein