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 ibtl 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 = ibtl 410Sstevel@tonic-gateOBJECTS = $(IBTL_OBJS:%=$(OBJS_DIR)/%) 420Sstevel@tonic-gateLINTS = $(IBTL_OBJS:%.o=$(LINTS_DIR)/%.ln) 430Sstevel@tonic-gateROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE) 443138SfritsWARLOCK_OUT = $(IBTL_OBJS:%.o=%.ll) 453138SfritsWARLOCK_OK = $(MODULE).ok 463138SfritsWLCMD_DIR = $(UTSBASE)/common/io/warlock 470Sstevel@tonic-gate 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# 650Sstevel@tonic-gate# lint pass one enforcement 660Sstevel@tonic-gate# 670Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 680Sstevel@tonic-gate 690Sstevel@tonic-gate# 703066Sjg# For now, disable these lint checks; maintainers should endeavor 713066Sjg# to investigate and remove these for maximum lint coverage. 723066Sjg# Please do not carry these forward to new Makefiles. 733066Sjg# 743066SjgLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON 753066SjgLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 763066SjgLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 773066SjgLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 783066SjgLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 793066Sjg 803066Sjg# 810Sstevel@tonic-gate# Default build targets. 820Sstevel@tonic-gate# 830Sstevel@tonic-gate.KEEP_STATE: 840Sstevel@tonic-gate 850Sstevel@tonic-gatedef: $(DEF_DEPS) 860Sstevel@tonic-gate 870Sstevel@tonic-gateall: $(ALL_DEPS) 880Sstevel@tonic-gate 890Sstevel@tonic-gateclean: $(CLEAN_DEPS) 903138Sfrits $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 910Sstevel@tonic-gate 920Sstevel@tonic-gateclobber: $(CLOBBER_DEPS) 933138Sfrits $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 940Sstevel@tonic-gate 950Sstevel@tonic-gatelint: $(LINT_DEPS) 960Sstevel@tonic-gate 970Sstevel@tonic-gatemodlintlib: $(MODLINTLIB_DEPS) 980Sstevel@tonic-gate 990Sstevel@tonic-gateclean.lint: $(CLEAN_LINT_DEPS) 1000Sstevel@tonic-gate 1010Sstevel@tonic-gateinstall: $(INSTALL_DEPS) 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate# 1040Sstevel@tonic-gate# Include common targets. 1050Sstevel@tonic-gate# 1060Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ 1070Sstevel@tonic-gate 1083138Sfrits# 1093138Sfrits# Defines for local commands. 1103138Sfrits# 1113138SfritsWARLOCK = warlock 1123138SfritsWLCC = wlcc 1133138SfritsTOUCH = touch 1143138SfritsTEST = test 1153138Sfrits 1163138Sfritswarlock: $(WARLOCK_OK) 1173138Sfrits 118*4604Sstevel$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/ibtl.wlcmd 1193138Sfrits $(WARLOCK) -c $(WLCMD_DIR)/ibtl.wlcmd $(WARLOCK_OUT) -l \ 1203138Sfrits ../warlock/ddi_dki_impl.ll 1213138Sfrits $(TOUCH) $@ 1223138Sfrits 1233138Sfrits%.ll: $(UTSBASE)/common/io/ib/ibtl/%.c 1243138Sfrits $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 1253138Sfrits 1263138Sfritswarlock_ddi.files: 1273138Sfrits @cd ../warlock; pwd; $(MAKE) warlock 128