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 5*7423SRussell.Blaine@Sun.COM# Common Development and Distribution License (the "License"). 6*7423SRussell.Blaine@Sun.COM# 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*7423SRussell.Blaine@Sun.COM# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# cmd/vgrind/Makefile 260Sstevel@tonic-gate 270Sstevel@tonic-gate# 280Sstevel@tonic-gate# These are the objects associated with the overall vgrind command. 290Sstevel@tonic-gate# 300Sstevel@tonic-gateVFONTEDPR= vfontedpr 310Sstevel@tonic-gateRETEST= retest 320Sstevel@tonic-gateMACROS= tmac.vgrind 330Sstevel@tonic-gateLANGDEFS= vgrindefs 340Sstevel@tonic-gateKSHPROG= vgrind 350Sstevel@tonic-gate 360Sstevel@tonic-gate# 370Sstevel@tonic-gate# These macros captures objects that ultimately will be installed in 380Sstevel@tonic-gate# (respectively) /usr/bin, /usr/lib, and /usr/share/lib. 390Sstevel@tonic-gate# 400Sstevel@tonic-gate# Note also that retest is used strictly as a test program and is never 410Sstevel@tonic-gate# installed. We omit it here, so that the NSE doesn't spend cycles 420Sstevel@tonic-gate# on it when acquiring and reconciling. 430Sstevel@tonic-gate# 440Sstevel@tonic-gatePROG= $(KSHPROG) 450Sstevel@tonic-gateLIBPROG= $(VFONTEDPR) $(LANGDEFS) 460Sstevel@tonic-gateTMACPROG= $(MACROS) 470Sstevel@tonic-gate 480Sstevel@tonic-gateVFONTEDPROBJS= vfontedpr.o vgrindefs.o regexp.o 490Sstevel@tonic-gateRETESTOBJS= retest.o regexp.o 500Sstevel@tonic-gate 510Sstevel@tonic-gateRETESTSRC= $(RETESTOBJS:%.o=%.c) 520Sstevel@tonic-gate 530Sstevel@tonic-gateOBJS= $(VFONTEDPROBJS) $(RETESTOBJS) 540Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 550Sstevel@tonic-gate 560Sstevel@tonic-gate# 570Sstevel@tonic-gate# We can get away simply with omitting TMACPROGS to protect 580Sstevel@tonic-gate# tmac.vgrind, since it's the only entry in that macro. 590Sstevel@tonic-gate# 600Sstevel@tonic-gateCLOBBERFILES= $(LIBPROG) $(RETEST) 610Sstevel@tonic-gate 620Sstevel@tonic-gateinclude ../Makefile.cmd 630Sstevel@tonic-gate 640Sstevel@tonic-gate# 650Sstevel@tonic-gate# Message catalog 660Sstevel@tonic-gate# 670Sstevel@tonic-gatePOFILES= $(OBJS:%.o=%.po) 680Sstevel@tonic-gatePOFILE= vgrind.po 690Sstevel@tonic-gatePOFILE_KSH= vgrind_ksh.po 700Sstevel@tonic-gate 710Sstevel@tonic-gate# 720Sstevel@tonic-gate# Abbreviation for future use. 730Sstevel@tonic-gate# 740Sstevel@tonic-gateROOTTMAC= $(ROOT)/usr/share/lib/tmac 750Sstevel@tonic-gate 760Sstevel@tonic-gate# 770Sstevel@tonic-gate# Override macro definitions from Makefile.cmd. Necessary because 780Sstevel@tonic-gate# we're building targets for multiple destinations. 790Sstevel@tonic-gate# 800Sstevel@tonic-gateROOTLIBPROG= $(LIBPROG:%=$(ROOT)/usr/lib/%) 810Sstevel@tonic-gateROOTTMACPROG= $(TMACPROG:%=$(ROOTTMAC)/%) 820Sstevel@tonic-gate 830Sstevel@tonic-gate# 840Sstevel@tonic-gate# Conditional assignments pertinent to installation. 850Sstevel@tonic-gate# 860Sstevel@tonic-gate$(ROOTLIB)/$(LANGDEFS) := FILEMODE= $(LIBFILEMODE) 870Sstevel@tonic-gate$(ROOTTMACPROG) := FILEMODE= 0644 880Sstevel@tonic-gate 890Sstevel@tonic-gate# 900Sstevel@tonic-gate# The standard set of rules doesn't know about installing into 910Sstevel@tonic-gate# subdirectories of /usr/share/lib, so we have to roll our own. 920Sstevel@tonic-gate# 930Sstevel@tonic-gate$(ROOTTMAC)/%: % 940Sstevel@tonic-gate $(INS.file) 950Sstevel@tonic-gate 960Sstevel@tonic-gate.KEEP_STATE: 970Sstevel@tonic-gate 980Sstevel@tonic-gate# 990Sstevel@tonic-gate# retest appears here only in source form; see comment above for PROG. 1000Sstevel@tonic-gate# 1010Sstevel@tonic-gateall: $(PROG) $(LIBPROG) $(TMACPROG) $(RETESTSRC) 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate# 1040Sstevel@tonic-gate# message catalog 1050Sstevel@tonic-gate# 1060Sstevel@tonic-gate$(POFILE): $(POFILES) $(POFILE_KSH) 1070Sstevel@tonic-gate rm -f $@ 1080Sstevel@tonic-gate cat $(POFILES) $(POFILE_KSH) > $@ 1090Sstevel@tonic-gate 1100Sstevel@tonic-gate$(VFONTEDPR): $(VFONTEDPROBJS) 1110Sstevel@tonic-gate $(CC) -o $@ $(VFONTEDPROBJS) $(LDFLAGS) $(LDLIBS) 1120Sstevel@tonic-gate $(POST_PROCESS) 1130Sstevel@tonic-gate 1140Sstevel@tonic-gate$(LANGDEFS): $(LANGDEFS).src 1150Sstevel@tonic-gate $(CP) $? $@ 1160Sstevel@tonic-gate 1170Sstevel@tonic-gate$(RETEST): $(RETESTOBJS) 1180Sstevel@tonic-gate $(CC) -o $@ $(RETESTOBJS) $(LDFLAGS) $(LDLIBS) 1190Sstevel@tonic-gate $(POST_PROCESS) 1200Sstevel@tonic-gate 1210Sstevel@tonic-gate# 1220Sstevel@tonic-gate# We add all as a dependent to make sure that the install pattern 1230Sstevel@tonic-gate# matching rules see everything they should. (This is a safety net.) 1240Sstevel@tonic-gate# 1250Sstevel@tonic-gate# XXX: ROOTTMAC shouldn't appear as a dependent; it's here as a 1260Sstevel@tonic-gate# bandaid(TM) until /usr/lib/tmac becomes a symlink to 1270Sstevel@tonic-gate# /usr/share/lib/tmac. 1280Sstevel@tonic-gate# 1290Sstevel@tonic-gateinstall: all $(ROOTTMAC) $(ROOTPROG) $(ROOTLIBPROG) $(ROOTTMACPROG) 1300Sstevel@tonic-gate 1310Sstevel@tonic-gate# XXX: see above. 1320Sstevel@tonic-gate$(ROOTTMAC): 1330Sstevel@tonic-gate $(INS.dir) 1340Sstevel@tonic-gate 1350Sstevel@tonic-gateclean: 1360Sstevel@tonic-gate $(RM) $(OBJS) 1370Sstevel@tonic-gate 1380Sstevel@tonic-gate# 1390Sstevel@tonic-gate# Don't worry about linting retest. 1400Sstevel@tonic-gate# 1410Sstevel@tonic-gatelint:= SRCS = $(VFONTEDPROBJS:%.o=%.c) 1420Sstevel@tonic-gatelint: lint_SRCS 1430Sstevel@tonic-gate 1440Sstevel@tonic-gateinclude ../Makefile.targ 145