xref: /onnv-gate/usr/src/uts/intel/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#
253138Sfrits#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#	intel 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
453138SfritsWARLOCK_OUT	= $(IBMF_OBJS:%.o=%.ll)
463138SfritsWARLOCK_OK	= $(MODULE).ok
473138SfritsWLCMD_DIR	= $(UTSBASE)/common/io/warlock
480Sstevel@tonic-gate#
490Sstevel@tonic-gate#	Include common rules.
500Sstevel@tonic-gate#
510Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel
520Sstevel@tonic-gate
530Sstevel@tonic-gate#
540Sstevel@tonic-gate#	Define targets
550Sstevel@tonic-gate#
560Sstevel@tonic-gateALL_TARGET	= $(BINARY)
570Sstevel@tonic-gateLINT_TARGET	= $(MODULE).lint
580Sstevel@tonic-gateINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
590Sstevel@tonic-gate
600Sstevel@tonic-gate#
610Sstevel@tonic-gate#	Overrides
620Sstevel@tonic-gate#
630Sstevel@tonic-gate
640Sstevel@tonic-gate#DEBUG_DEFS_DBG32 += -DTNF_DEBUG
650Sstevel@tonic-gate
660Sstevel@tonic-gate#
670Sstevel@tonic-gate# lint pass one enforcement
680Sstevel@tonic-gate#
690Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
700Sstevel@tonic-gate
710Sstevel@tonic-gate#
723066Sjg# For now, disable these lint checks; maintainers should endeavor
733066Sjg# to investigate and remove these for maximum lint coverage.
743066Sjg# Please do not carry these forward to new Makefiles.
753066Sjg#
763066SjgLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
773066SjgLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
783066Sjg
793066Sjg#
800Sstevel@tonic-gate#	Default build targets.
810Sstevel@tonic-gate#
820Sstevel@tonic-gate.KEEP_STATE:
830Sstevel@tonic-gate
840Sstevel@tonic-gatedef:		$(DEF_DEPS)
850Sstevel@tonic-gate
860Sstevel@tonic-gateall:		$(ALL_DEPS)
870Sstevel@tonic-gate
880Sstevel@tonic-gateclean:		$(CLEAN_DEPS)
893138Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
900Sstevel@tonic-gate
910Sstevel@tonic-gateclobber:	$(CLOBBER_DEPS)
923138Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
930Sstevel@tonic-gate
940Sstevel@tonic-gatelint:		$(LINT_DEPS)
950Sstevel@tonic-gate
960Sstevel@tonic-gatemodlintlib:	$(MODLINTLIB_DEPS)
970Sstevel@tonic-gate
980Sstevel@tonic-gateclean.lint:	$(CLEAN_LINT_DEPS)
990Sstevel@tonic-gate
1000Sstevel@tonic-gateinstall:	$(INSTALL_DEPS)
1010Sstevel@tonic-gate
1020Sstevel@tonic-gate#
1030Sstevel@tonic-gate#	Include common targets.
1040Sstevel@tonic-gate#
1050Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ
1060Sstevel@tonic-gate
1073138Sfrits#
1083138Sfrits#	Defines for local commands.
1093138Sfrits#
1103138SfritsWLCC		= wlcc
1113138SfritsTOUCH		= touch
1123138SfritsWARLOCK		= warlock
1133138SfritsTEST		= test
1143138Sfrits
1153138Sfrits#
1163138Sfrits#	Warlock targets
1173138Sfrits#
1183138Sfritswarlock: $(WARLOCK_OK)
1193138Sfrits
120*4604Sstevel$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/ibmf.wlcmd
1213138Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/ibmf.wlcmd $(WARLOCK_OUT) \
1223138Sfrits		-l ../warlock/ddi_dki_impl.ll
1233138Sfrits	$(TOUCH) $@
1243138Sfrits
1253138Sfrits%.ll: $(UTSBASE)/common/io/ib/mgt/ibmf/%.c
1263138Sfrits	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
1273138Sfrits
1283138Sfritswarlock_ddi.files:
1293138Sfrits	@cd ../warlock; pwd; $(MAKE) warlock
130