xref: /onnv-gate/usr/src/uts/sparc/ibmf/Makefile (revision 4604:5989fb2cb1d5)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
53066Sjg# Common Development and Distribution License (the "License").
63066Sjg# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*4604Sstevel# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
260Sstevel@tonic-gate#
270Sstevel@tonic-gate#	This makefile drives the production of the ibmf kernel module.
280Sstevel@tonic-gate#
290Sstevel@tonic-gate#	sparc architecture dependent
300Sstevel@tonic-gate#
310Sstevel@tonic-gate
320Sstevel@tonic-gate#
330Sstevel@tonic-gate#	Path to the base of the uts directory tree (usually /usr/src/uts).
340Sstevel@tonic-gate#
350Sstevel@tonic-gateUTSBASE	= ../..
360Sstevel@tonic-gate
370Sstevel@tonic-gate#
380Sstevel@tonic-gate#	Define the module and object file sets.
390Sstevel@tonic-gate#
400Sstevel@tonic-gateMODULE		= ibmf
410Sstevel@tonic-gateOBJECTS		= $(IBMF_OBJS:%=$(OBJS_DIR)/%)
420Sstevel@tonic-gateLINTS		= $(IBMF_OBJS:%.o=$(LINTS_DIR)/%.ln)
430Sstevel@tonic-gateROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
440Sstevel@tonic-gateLDFLAGS		+= -dy -Nmisc/ibtl
45978SfritsWARLOCK_OUT     = $(IBMF_OBJS:%.o=%.ll)
46978SfritsWARLOCK_OK      = $(MODULE).ok
473138SfritsWLCMD_DIR	= $(UTSBASE)/common/io/warlock
48978Sfrits
490Sstevel@tonic-gate#
500Sstevel@tonic-gate#	Include common rules.
510Sstevel@tonic-gate#
520Sstevel@tonic-gateinclude $(UTSBASE)/sparc/Makefile.sparc
530Sstevel@tonic-gate
540Sstevel@tonic-gate#
550Sstevel@tonic-gate#	Define targets
560Sstevel@tonic-gate#
570Sstevel@tonic-gateALL_TARGET	= $(BINARY)
580Sstevel@tonic-gateLINT_TARGET	= $(MODULE).lint
590Sstevel@tonic-gateINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
600Sstevel@tonic-gate
610Sstevel@tonic-gate#
620Sstevel@tonic-gate#	Overrides
630Sstevel@tonic-gate#
640Sstevel@tonic-gate
650Sstevel@tonic-gate#DEBUG_DEFS_DBG64 += -DTNF_DEBUG
660Sstevel@tonic-gateALL_BUILDS	= $(ALL_BUILDSONLY64)
670Sstevel@tonic-gateDEF_BUILDS	= $(DEF_BUILDSONLY64)
680Sstevel@tonic-gate
690Sstevel@tonic-gate#
700Sstevel@tonic-gate# lint pass one enforcement
710Sstevel@tonic-gate#
720Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
730Sstevel@tonic-gate
740Sstevel@tonic-gate#
753066Sjg# For now, disable these lint checks; maintainers should endeavor
763066Sjg# to investigate and remove these for maximum lint coverage.
773066Sjg# Please do not carry these forward to new Makefiles.
783066Sjg#
793066SjgLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
803066SjgLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
813066Sjg
823066Sjg#
830Sstevel@tonic-gate#	Default build targets.
840Sstevel@tonic-gate#
850Sstevel@tonic-gate.KEEP_STATE:
860Sstevel@tonic-gate
870Sstevel@tonic-gatedef:		$(DEF_DEPS)
880Sstevel@tonic-gate
890Sstevel@tonic-gateall:		$(ALL_DEPS)
900Sstevel@tonic-gate
913138Sfritsclean:		$(CLEAN_DEPS)
92978Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
930Sstevel@tonic-gate
943138Sfritsclobber:	$(CLOBBER_DEPS)
95978Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
960Sstevel@tonic-gate
970Sstevel@tonic-gatelint:		$(LINT_DEPS)
980Sstevel@tonic-gate
990Sstevel@tonic-gatemodlintlib:	$(MODLINTLIB_DEPS) lint32
1000Sstevel@tonic-gate
1010Sstevel@tonic-gateclean.lint:	$(CLEAN_LINT_DEPS)
1020Sstevel@tonic-gate
1030Sstevel@tonic-gateinstall:	$(INSTALL_DEPS)
1040Sstevel@tonic-gate
1050Sstevel@tonic-gate#
1060Sstevel@tonic-gate#	Include common targets.
1070Sstevel@tonic-gate#
1080Sstevel@tonic-gateinclude $(UTSBASE)/sparc/Makefile.targ
1090Sstevel@tonic-gate
1100Sstevel@tonic-gate#
1110Sstevel@tonic-gate#	Defines for local commands.
1120Sstevel@tonic-gate#
1130Sstevel@tonic-gateWLCC		= wlcc
1140Sstevel@tonic-gateTOUCH		= touch
1150Sstevel@tonic-gateWARLOCK		= warlock
1160Sstevel@tonic-gateTEST		= test
1170Sstevel@tonic-gate
1180Sstevel@tonic-gate#
1190Sstevel@tonic-gate#	Warlock targets
1200Sstevel@tonic-gate#
1213138Sfritswarlock: $(WARLOCK_OK)
1220Sstevel@tonic-gate
123*4604Sstevel$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/ibmf.wlcmd
1243138Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/ibmf.wlcmd $(WARLOCK_OUT) \
1250Sstevel@tonic-gate		-l ../warlock/ddi_dki_impl.ll
1260Sstevel@tonic-gate	$(TOUCH) $@
1270Sstevel@tonic-gate
1280Sstevel@tonic-gate%.ll: $(UTSBASE)/common/io/ib/mgt/ibmf/%.c
1290Sstevel@tonic-gate	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
1300Sstevel@tonic-gate
1310Sstevel@tonic-gatewarlock_ddi.files:
1320Sstevel@tonic-gate	@cd ../warlock; pwd; $(MAKE) warlock
133