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# 280Sstevel@tonic-gate# 290Sstevel@tonic-gate# This makefile drives the production of the ibnex driver 300Sstevel@tonic-gate# 310Sstevel@tonic-gate# intel architecture dependent 320Sstevel@tonic-gate# 330Sstevel@tonic-gate 340Sstevel@tonic-gate# 350Sstevel@tonic-gate# Path to the base of the uts directory tree (usually /usr/src/uts). 360Sstevel@tonic-gate# 370Sstevel@tonic-gateUTSBASE = ../.. 380Sstevel@tonic-gate 390Sstevel@tonic-gate# 400Sstevel@tonic-gate# Define the module and object file sets. 410Sstevel@tonic-gate# 420Sstevel@tonic-gateMODULE = ib 430Sstevel@tonic-gateOBJECTS = $(IB_OBJS:%=$(OBJS_DIR)/%) 440Sstevel@tonic-gateLINTS = $(IB_OBJS:%.o=$(LINTS_DIR)/%.ln) 450Sstevel@tonic-gateROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 460Sstevel@tonic-gateCONF_SRCDIR = $(UTSBASE)/common/io/ib/ibnex 473138SfritsWARLOCK_OUT = $(IB_OBJS:%.o=%.ll) 483138SfritsWARLOCK_OK = $(MODULE).ok 493138SfritsWLCMD_DIR = $(UTSBASE)/common/io/warlock 500Sstevel@tonic-gate 510Sstevel@tonic-gate# 520Sstevel@tonic-gate# Include common rules. 530Sstevel@tonic-gate# 540Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel 550Sstevel@tonic-gate 560Sstevel@tonic-gate# 570Sstevel@tonic-gate# Define targets 580Sstevel@tonic-gate# 590Sstevel@tonic-gateALL_TARGET = $(BINARY) $(SRC_CONFILE) 600Sstevel@tonic-gateLINT_TARGET = $(MODULE).lint 610Sstevel@tonic-gateINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 620Sstevel@tonic-gate 630Sstevel@tonic-gate# 640Sstevel@tonic-gate# Overrides. 650Sstevel@tonic-gate# 660Sstevel@tonic-gate 670Sstevel@tonic-gate# 680Sstevel@tonic-gate# lint pass one enforcement 690Sstevel@tonic-gate# 700Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 710Sstevel@tonic-gate 720Sstevel@tonic-gate# 730Sstevel@tonic-gate# depends on misc/ibtl 740Sstevel@tonic-gate# 750Sstevel@tonic-gateLDFLAGS += -dy -Nmisc/ibdm -Nmisc/ibtl 760Sstevel@tonic-gate 770Sstevel@tonic-gate# 783066Sjg# For now, disable these lint checks; maintainers should endeavor 793066Sjg# to investigate and remove these for maximum lint coverage. 803066Sjg# Please do not carry these forward to new Makefiles. 813066Sjg# 823066SjgLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON 833066SjgLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 843066SjgLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 853066SjgLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 863066Sjg 873066Sjg# 880Sstevel@tonic-gate# Default build targets. 890Sstevel@tonic-gate# 900Sstevel@tonic-gate.KEEP_STATE: 910Sstevel@tonic-gate 920Sstevel@tonic-gatedef: $(DEF_DEPS) 930Sstevel@tonic-gate 940Sstevel@tonic-gateall: $(ALL_DEPS) 950Sstevel@tonic-gate 960Sstevel@tonic-gateclean: $(CLEAN_DEPS) 973138Sfrits $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 980Sstevel@tonic-gate 990Sstevel@tonic-gateclobber: $(CLOBBER_DEPS) 1003138Sfrits $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 1010Sstevel@tonic-gate 1020Sstevel@tonic-gatelint: $(LINT_DEPS) 1030Sstevel@tonic-gate 1040Sstevel@tonic-gatemodlintlib: $(MODLINTLIB_DEPS) 1050Sstevel@tonic-gate 1060Sstevel@tonic-gateclean.lint: $(CLEAN_LINT_DEPS) 1070Sstevel@tonic-gate 1080Sstevel@tonic-gateinstall: $(INSTALL_DEPS) 1090Sstevel@tonic-gate 1100Sstevel@tonic-gate# 1110Sstevel@tonic-gate# Include common targets. 1120Sstevel@tonic-gate# 1130Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ 1143138Sfrits 1153138Sfrits# 1163138Sfrits# Defines for local commands. 1173138Sfrits# 1183138SfritsWARLOCK = warlock 1193138SfritsWLCC = wlcc 1203138SfritsTOUCH = touch 1213138SfritsTEST = test 1223138Sfrits 1233138SfritsIBDM_FILES = $(IBDM_OBJS:%.o=../ibdm/%.ll) 1243138Sfrits 1253138Sfritswarlock: $(WARLOCK_OK) 1263138Sfrits 127*4604Sstevel$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/ib.wlcmd ibdm_files 1283138Sfrits $(WARLOCK) -c $(WLCMD_DIR)/ib.wlcmd $(WARLOCK_OUT) \ 1293138Sfrits -l $(IBDM_FILES) -l ../warlock/ddi_dki_impl.ll 1303138Sfrits $(TOUCH) $@ 1313138Sfrits 1323138Sfrits%.ll: $(UTSBASE)/common/io/ib/ibnex/%.c \ 1333138Sfrits $(UTSBASE)/common/sys/ib/ibnex/ibnex.h \ 1343138Sfrits $(UTSBASE)/common/sys/ib/ibnex/ibnex_devctl.h 1353138Sfrits $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 1363138Sfrits 1373138Sfritsibdm_files : 1383138Sfrits @cd ../ibdm; pwd; $(MAKE) warlock 1393138Sfrits 1403138Sfritswarlock_ddi.files: 1413138Sfrits @cd ../warlock; pwd; $(MAKE) warlock 142