17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 599ba4d70SRussell Blaine# Common Development and Distribution License (the "License"). 699ba4d70SRussell Blaine# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2299ba4d70SRussell Blaine# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# cmd/vgrind/Makefile 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate# These are the objects associated with the overall vgrind command. 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gateVFONTEDPR= vfontedpr 317c478bd9Sstevel@tonic-gateRETEST= retest 327c478bd9Sstevel@tonic-gateMACROS= tmac.vgrind 337c478bd9Sstevel@tonic-gateLANGDEFS= vgrindefs 347c478bd9Sstevel@tonic-gateKSHPROG= vgrind 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate# 377c478bd9Sstevel@tonic-gate# These macros captures objects that ultimately will be installed in 387c478bd9Sstevel@tonic-gate# (respectively) /usr/bin, /usr/lib, and /usr/share/lib. 397c478bd9Sstevel@tonic-gate# 407c478bd9Sstevel@tonic-gate# Note also that retest is used strictly as a test program and is never 417c478bd9Sstevel@tonic-gate# installed. We omit it here, so that the NSE doesn't spend cycles 427c478bd9Sstevel@tonic-gate# on it when acquiring and reconciling. 437c478bd9Sstevel@tonic-gate# 447c478bd9Sstevel@tonic-gatePROG= $(KSHPROG) 457c478bd9Sstevel@tonic-gateLIBPROG= $(VFONTEDPR) $(LANGDEFS) 467c478bd9Sstevel@tonic-gateTMACPROG= $(MACROS) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gateVFONTEDPROBJS= vfontedpr.o vgrindefs.o regexp.o 497c478bd9Sstevel@tonic-gateRETESTOBJS= retest.o regexp.o 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gateRETESTSRC= $(RETESTOBJS:%.o=%.c) 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateOBJS= $(VFONTEDPROBJS) $(RETESTOBJS) 547c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate# 577c478bd9Sstevel@tonic-gate# We can get away simply with omitting TMACPROGS to protect 587c478bd9Sstevel@tonic-gate# tmac.vgrind, since it's the only entry in that macro. 597c478bd9Sstevel@tonic-gate# 607c478bd9Sstevel@tonic-gateCLOBBERFILES= $(LIBPROG) $(RETEST) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd 637c478bd9Sstevel@tonic-gate 64*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 65*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 66*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 67*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 68*7014882cSRichard Lowe 697c478bd9Sstevel@tonic-gate# 707c478bd9Sstevel@tonic-gate# Message catalog 717c478bd9Sstevel@tonic-gate# 727c478bd9Sstevel@tonic-gatePOFILES= $(OBJS:%.o=%.po) 737c478bd9Sstevel@tonic-gatePOFILE= vgrind.po 747c478bd9Sstevel@tonic-gatePOFILE_KSH= vgrind_ksh.po 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate# 777c478bd9Sstevel@tonic-gate# Abbreviation for future use. 787c478bd9Sstevel@tonic-gate# 797c478bd9Sstevel@tonic-gateROOTTMAC= $(ROOT)/usr/share/lib/tmac 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate# 827c478bd9Sstevel@tonic-gate# Override macro definitions from Makefile.cmd. Necessary because 837c478bd9Sstevel@tonic-gate# we're building targets for multiple destinations. 847c478bd9Sstevel@tonic-gate# 857c478bd9Sstevel@tonic-gateROOTLIBPROG= $(LIBPROG:%=$(ROOT)/usr/lib/%) 867c478bd9Sstevel@tonic-gateROOTTMACPROG= $(TMACPROG:%=$(ROOTTMAC)/%) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate# 897c478bd9Sstevel@tonic-gate# Conditional assignments pertinent to installation. 907c478bd9Sstevel@tonic-gate# 917c478bd9Sstevel@tonic-gate$(ROOTLIB)/$(LANGDEFS) := FILEMODE= $(LIBFILEMODE) 927c478bd9Sstevel@tonic-gate$(ROOTTMACPROG) := FILEMODE= 0644 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate# 957c478bd9Sstevel@tonic-gate# The standard set of rules doesn't know about installing into 967c478bd9Sstevel@tonic-gate# subdirectories of /usr/share/lib, so we have to roll our own. 977c478bd9Sstevel@tonic-gate# 987c478bd9Sstevel@tonic-gate$(ROOTTMAC)/%: % 997c478bd9Sstevel@tonic-gate $(INS.file) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate.KEEP_STATE: 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# 1047c478bd9Sstevel@tonic-gate# retest appears here only in source form; see comment above for PROG. 1057c478bd9Sstevel@tonic-gate# 1067c478bd9Sstevel@tonic-gateall: $(PROG) $(LIBPROG) $(TMACPROG) $(RETESTSRC) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate# 1097c478bd9Sstevel@tonic-gate# message catalog 1107c478bd9Sstevel@tonic-gate# 1117c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) $(POFILE_KSH) 1127c478bd9Sstevel@tonic-gate rm -f $@ 1137c478bd9Sstevel@tonic-gate cat $(POFILES) $(POFILE_KSH) > $@ 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate$(VFONTEDPR): $(VFONTEDPROBJS) 1167c478bd9Sstevel@tonic-gate $(CC) -o $@ $(VFONTEDPROBJS) $(LDFLAGS) $(LDLIBS) 1177c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate$(LANGDEFS): $(LANGDEFS).src 1207c478bd9Sstevel@tonic-gate $(CP) $? $@ 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(RETEST): $(RETESTOBJS) 1237c478bd9Sstevel@tonic-gate $(CC) -o $@ $(RETESTOBJS) $(LDFLAGS) $(LDLIBS) 1247c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate# 1277c478bd9Sstevel@tonic-gate# We add all as a dependent to make sure that the install pattern 1287c478bd9Sstevel@tonic-gate# matching rules see everything they should. (This is a safety net.) 1297c478bd9Sstevel@tonic-gate# 1307c478bd9Sstevel@tonic-gate# XXX: ROOTTMAC shouldn't appear as a dependent; it's here as a 1317c478bd9Sstevel@tonic-gate# bandaid(TM) until /usr/lib/tmac becomes a symlink to 1327c478bd9Sstevel@tonic-gate# /usr/share/lib/tmac. 1337c478bd9Sstevel@tonic-gate# 1347c478bd9Sstevel@tonic-gateinstall: all $(ROOTTMAC) $(ROOTPROG) $(ROOTLIBPROG) $(ROOTTMACPROG) 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate# XXX: see above. 1377c478bd9Sstevel@tonic-gate$(ROOTTMAC): 1387c478bd9Sstevel@tonic-gate $(INS.dir) 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gateclean: 1417c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate# 1447c478bd9Sstevel@tonic-gate# Don't worry about linting retest. 1457c478bd9Sstevel@tonic-gate# 1467c478bd9Sstevel@tonic-gatelint:= SRCS = $(VFONTEDPROBJS:%.o=%.c) 1477c478bd9Sstevel@tonic-gatelint: lint_SRCS 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 150