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 ecpp 280Sstevel@tonic-gate# kernel module. 290Sstevel@tonic-gate# 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 = ecpp 410Sstevel@tonic-gateOBJECTS = $(ECPP_OBJS:%=$(OBJS_DIR)/%) 420Sstevel@tonic-gateLINTS = $(ECPP_OBJS:%.o=$(LINTS_DIR)/%.ln) 430Sstevel@tonic-gateROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 440Sstevel@tonic-gateCONF_SRCDIR = $(UTSBASE)/common/io 453138SfritsWARLOCK_OUT = $(ECPP_OBJS:%.o=%.ll) 463138SfritsWARLOCK_OK = $(MODULE).ok 473138SfritsWLCMD_DIR = $(UTSBASE)/common/io/warlock 480Sstevel@tonic-gate 490Sstevel@tonic-gate# 500Sstevel@tonic-gate# Include common rules. 510Sstevel@tonic-gate# 520Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel 530Sstevel@tonic-gate 540Sstevel@tonic-gate# 550Sstevel@tonic-gate# Define targets 560Sstevel@tonic-gate# 570Sstevel@tonic-gateALL_TARGET = $(BINARY) $(SRC_CONFILE) 580Sstevel@tonic-gateLINT_TARGET = $(MODULE).lint 590Sstevel@tonic-gateINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 600Sstevel@tonic-gate 610Sstevel@tonic-gate# 623066Sjg# For now, disable these lint checks; maintainers should endeavor 633066Sjg# to investigate and remove these for maximum lint coverage. 643066Sjg# Please do not carry these forward to new Makefiles. 653066Sjg# 663066SjgLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 673066SjgLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 683066SjgLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 693066Sjg 703066Sjg# 710Sstevel@tonic-gate# Default build targets. 720Sstevel@tonic-gate# 730Sstevel@tonic-gate.KEEP_STATE: 740Sstevel@tonic-gate 750Sstevel@tonic-gatedef: $(DEF_DEPS) 760Sstevel@tonic-gate 770Sstevel@tonic-gateall: $(ALL_DEPS) 780Sstevel@tonic-gate 790Sstevel@tonic-gateclean: $(CLEAN_DEPS) 800Sstevel@tonic-gate 813138Sfritsclean: $(CLEAN_DEPS) 823138Sfrits $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 830Sstevel@tonic-gate 843138Sfritsclobber: $(CLOBBER_DEPS) 853138Sfrits $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 860Sstevel@tonic-gate 870Sstevel@tonic-gatemodlintlib: $(MODLINTLIB_DEPS) 880Sstevel@tonic-gate 890Sstevel@tonic-gateclean.lint: $(CLEAN_LINT_DEPS) 900Sstevel@tonic-gate 910Sstevel@tonic-gateinstall: $(INSTALL_DEPS) 920Sstevel@tonic-gate 930Sstevel@tonic-gate# 940Sstevel@tonic-gate# Include common targets. 950Sstevel@tonic-gate# 960Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ 973138Sfrits 983138Sfrits# 993138Sfrits# Defines for local commands. 1003138Sfrits# 1013138SfritsWARLOCK = warlock 1023138SfritsWLCC = wlcc 1033138SfritsTOUCH = touch 1043138SfritsTEST = test 1053138Sfrits 1063138Sfrits# 1073138Sfrits# lock_lint rules 1083138Sfrits# 1093138Sfritswarlock: $(WARLOCK_OK) 1103138Sfrits 111*4604Sstevel$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/ecpp.wlcmd warlock_ddi.files 1123138Sfrits $(WARLOCK) -c $(WLCMD_DIR)/ecpp.wlcmd $(WARLOCK_OUT) \ 1133138Sfrits -l ../warlock/ddi_dki_impl.ll 1143138Sfrits $(TOUCH) $@ 1153138Sfrits 1163138Sfrits%.ll: $(UTSBASE)/common/io/%.c $(UTSBASE)/common/sys/ecppvar.h \ 1173138Sfrits $(UTSBASE)/common/sys/ecppio.h 1183138Sfrits $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 1193138Sfrits 1203138Sfritswarlock_ddi.files: 1213138Sfrits cd ../warlock; pwd; $(MAKE) warlock 122