Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer# CDDL HEADER START
a269ca51cc3c4abcf39eb01c357ba3dc8dfd80d0Tinderbox User#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# The contents of this file are subject to the terms of the
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Common Development and Distribution License (the "License").
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# You may not use this file except in compliance with the License.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# or http://www.opensolaris.org/os/licensing.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# See the License for the specific language governing permissions
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# and limitations under the License.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
1d32b1df372d6be6bac6450739b9e5ea23819995Evan Hunt#
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer# CDDL HEADER END
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer# Use is subject to license terms.
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews#
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#ident "%Z%%M% %I% %E% SMI"
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt# Path to the base of the uts directory tree.
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan HuntUTSBASE = ../..
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
ac31adc3b76a3acf61c711d1cd49480a288b1317Mukund Sivaraman# Define the module and object file sets.
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan HuntMODULE = av1394
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan HuntOBJECTS = $(AV1394_OBJS:%=$(OBJS_DIR)/%)
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan HuntLINTS = $(AV1394_OBJS:%.o=$(LINTS_DIR)/%.ln)
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan HuntROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt# Include common rules.
30a60d2aff0ec1810262a8b8efc532e28b32bd57Evan Hunt#
222d38735f97f771054e223b03f84c5858252332Evan Huntinclude $(UTSBASE)/sparc/Makefile.sparc
c634c94d673f1bab17e7f65d332f989b683e712cDavid Lawrence
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#
222d38735f97f771054e223b03f84c5858252332Evan Hunt# Define targets
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
c3c6770e537ea916265c78d0294ad108233e17c1Michael SawyerALL_TARGET = $(BINARY)
222d38735f97f771054e223b03f84c5858252332Evan HuntLINT_TARGET = $(MODULE).lint
c634c94d673f1bab17e7f65d332f989b683e712cDavid LawrenceINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
222d38735f97f771054e223b03f84c5858252332Evan Hunt# Overrides
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#
222d38735f97f771054e223b03f84c5858252332Evan HuntALL_BUILDS = $(ALL_BUILDSONLY64)
c634c94d673f1bab17e7f65d332f989b683e712cDavid LawrenceDEF_BUILDS = $(DEF_BUILDSONLY64)
222d38735f97f771054e223b03f84c5858252332Evan HuntCLEANLINTFILES += $(LINT32_FILES)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
222d38735f97f771054e223b03f84c5858252332Evan HuntDEBUG_DEFS_DBG32 += -DTNF_DEBUG
c3c6770e537ea916265c78d0294ad108233e17c1Michael SawyerDEBUG_DEFS_DBG64 += -DTNF_DEBUG
222d38735f97f771054e223b03f84c5858252332Evan Hunt
c634c94d673f1bab17e7f65d332f989b683e712cDavid Lawrence#
fdebae839745f79a7550aeb49d15a930523ec483David Lawrence# lint pass one enforcement
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
28002bd7cb4baa0eab9f47e1e51069c5ea7ea5d4Andreas GustafssonCFLAGS += $(CCVERBOSE)
28002bd7cb4baa0eab9f47e1e51069c5ea7ea5d4Andreas Gustafsson
1d32b1df372d6be6bac6450739b9e5ea23819995Evan Hunt#
1d32b1df372d6be6bac6450739b9e5ea23819995Evan Hunt# For now, disable these lint checks; maintainers should endeavor
28002bd7cb4baa0eab9f47e1e51069c5ea7ea5d4Andreas Gustafsson# to investigate and remove these for maximum lint coverage.
28002bd7cb4baa0eab9f47e1e51069c5ea7ea5d4Andreas Gustafsson# Please do not carry these forward to new Makefiles.
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
222d38735f97f771054e223b03f84c5858252332Evan HuntLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan HuntLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan HuntLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
c3c6770e537ea916265c78d0294ad108233e17c1Michael SawyerLINTTAGS += -erroff=E_STATIC_UNUSED
222d38735f97f771054e223b03f84c5858252332Evan HuntLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
c634c94d673f1bab17e7f65d332f989b683e712cDavid LawrenceLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
222d38735f97f771054e223b03f84c5858252332Evan Hunt# depends on misc/s1394
c3c6770e537ea916265c78d0294ad108233e17c1Michael SawyerLDFLAGS += -dy -Nmisc/s1394
222d38735f97f771054e223b03f84c5858252332Evan Hunt
c634c94d673f1bab17e7f65d332f989b683e712cDavid Lawrence# Default build targets.
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyer#
222d38735f97f771054e223b03f84c5858252332Evan Hunt.KEEP_STATE:
222d38735f97f771054e223b03f84c5858252332Evan Hunt
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyerdef: $(DEF_DEPS)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
c634c94d673f1bab17e7f65d332f989b683e712cDavid Lawrenceall: $(ALL_DEPS)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Huntclean: $(CLEAN_DEPS)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
c3c6770e537ea916265c78d0294ad108233e17c1Michael Sawyerclobber: $(CLOBBER_DEPS)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Huntlint: $(LINT_DEPS)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Huntmodlintlib: $(MODLINTLIB_DEPS) lint32
222d38735f97f771054e223b03f84c5858252332Evan Hunt
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Huntclean.lint: $(CLEAN_LINT_DEPS)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Huntinstall: $(INSTALL_DEPS)
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt# Include common targets.
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt#
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Huntinclude $(UTSBASE)/sparc/Makefile.targ
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt# Defines for local commands.
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt#
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan HuntWARLOCK = warlock
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan HuntWLCC = wlcc
222d38735f97f771054e223b03f84c5858252332Evan HuntTOUCH = touch
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan HuntSCCS = sccs
222d38735f97f771054e223b03f84c5858252332Evan HuntTEST = test
222d38735f97f771054e223b03f84c5858252332Evan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt# Warlock targets
222d38735f97f771054e223b03f84c5858252332Evan Hunt#
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan HuntWARLOCK_OBJECTS = $(AV1394_OBJS:%.o=%.ll)
222d38735f97f771054e223b03f84c5858252332Evan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Huntwarlock: $(MODULE).ok
9069215eac23e32f4ef1c8e44ad7ff2865cfcdacEvan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Hunt%.wlcmd:
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt $(TEST) -f $@ || $(SCCS) get $@
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt
222d38735f97f771054e223b03f84c5858252332Evan Hunt$(MODULE).ok: $(WARLOCK_OBJECTS) warlock_ddi.files av1394.wlcmd
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt $(WARLOCK) -c av1394.wlcmd $(WARLOCK_OBJECTS) \
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt -l ../warlock/ddi_dki_impl.ll
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt $(TOUCH) $@
222d38735f97f771054e223b03f84c5858252332Evan Hunt
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt%.ll: $(UTSBASE)/common/io/1394/targets/av1394/%.c
222d38735f97f771054e223b03f84c5858252332Evan Hunt $(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Huntwarlock_ddi.files:
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt @cd ../warlock; pwd; $(MAKE) warlock
b5b934a0bb46aded1552a17473652b5a7f4a3274Evan Hunt