Makefile revision a4aa671e336d5c717aff15808ab91a6bee5e6e41
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer# CDDL HEADER START
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# The contents of this file are subject to the terms of the
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Common Development and Distribution License (the "License").
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# You may not use this file except in compliance with the License.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# or http://www.opensolaris.org/os/licensing.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# See the License for the specific language governing permissions
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# and limitations under the License.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# When distributing Covered Code, include this CDDL HEADER in each
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# If applicable, add the following below this CDDL HEADER, with the
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# fields enclosed by brackets "[]" replaced with your own identifying
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# information: Portions Copyright [yyyy] [name of copyright owner]
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# CDDL HEADER END
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#ident "%Z%%M% %I% %E% SMI"
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Use is subject to license terms.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# uts/sparc/dad/Makefile
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# This makefile drives the production of the dad driver kernel module.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# SPARC architecture dependent
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Path to the base of the uts directory tree (usually /usr/src/uts).
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxUTSBASE = ../..
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Define the module and object file sets.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxMODULE = dad
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxOBJECTS = $(DAD_OBJS:%=$(OBJS_DIR)/%)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLINTS = $(DAD_OBJS:%.o=$(LINTS_DIR)/%.ln)
da14cebe459d3275048785f25bd869cb09b5307fEric ChengROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxCONF_SRCDIR = $(UTSBASE)/sun/io/dada/targets
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxWARLOCK_OUT = $(DAD_OBJS:%.o=%.ll)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxWARLOCK_OK = $(MODULE).ok
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxWLCMD_DIR = $(UTSBASE)/common/io/warlock
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Include common rules.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxinclude $(UTSBASE)/sparc/Makefile.sparc
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Define targets
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxALL_TARGET = $(BINARY)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLINT_TARGET = $(MODULE).lint
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Overrides.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxCFLAGS += $(CCVERBOSE)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLDFLAGS += -dy -Nmisc/dada -Nmisc/cmlb
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# For now, disable these lint checks; maintainers should endeavor
19b23afcc35b3926d062efc1930e65c5fed1084dhx# to investigate and remove these for maximum lint coverage.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Please do not carry these forward to new Makefiles.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLINTTAGS += -erroff=E_STATIC_UNUSED
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Default build targets.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx.KEEP_STATE:
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxall: $(ALL_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxdef: $(DEF_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxclean: $(CLEAN_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxclobber: $(CLOBBER_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxlint: $(LINT_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxmodlintlib: $(MODLINTLIB_DEPS) lint64
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxclean.lint: $(CLEAN_LINT_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxinstall: $(INSTALL_DEPS)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Include common targets.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxinclude $(UTSBASE)/sparc/Makefile.targ
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Defines for local commands.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxWARLOCK = warlock
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxWLCC = wlcc
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxTOUCH = touch
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxSCCS = sccs
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxTEST = test
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Warlock targets
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx#
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# Note that in warlock_with_{esp,isp} it is important to load sd.ll
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# before {isp,esp}.ll; the reason is that both have _init/_info/_fini
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# and warlock can only handle one extern function by a given name;
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx# any loaded after the first are ignored.
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxDADA_FILES = $(DADA_OBJS:%.o=-l $(UTSBASE)/sparc/dada/%.ll)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxCMLB_FILES = $(CMLB_OBJS:%.o=-l $(UTSBASE)/sparc/cmlb/%.ll)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxwarlock: warlock_alone
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxwarlock_alone: $(WARLOCK_OK)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx%.wlcmd:
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxdada_files:
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx @cd $(UTSBASE)/sparc/dada; pwd; $(MAKE) warlock
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxcmlb_files:
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx @cd $(UTSBASE)/sparc/cmlb; pwd; $(MAKE) warlock
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx$(WARLOCK_OK): dad.wlcmd $(WARLOCK_OUT) dada_files warlock_ddi.files cmlb_files dad.wlcmd
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx $(WARLOCK) -c $(WLCMD_DIR)/dad.wlcmd $(WARLOCK_OUT) -l $(DADA_FILES) \
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx -l $(CMLB_FILES) \
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx -l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx $(TOUCH) $@
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx%.ll: $(UTSBASE)/sun/io/dada/targets/%.c
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx $(WLCC) $(CPPFLAGS) -o $@ $<
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxwarlock_ddi.files:
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx @cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx