blob: 0bb0619aa24be527bbcbad2d15f1a5d671cf4423 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# cmd/vgrind/Makefile
#
# These are the objects associated with the overall vgrind command.
#
VFONTEDPR= vfontedpr
RETEST= retest
MACROS= tmac.vgrind
LANGDEFS= vgrindefs
KSHPROG= vgrind
#
# These macros captures objects that ultimately will be installed in
# (respectively) /usr/bin, /usr/lib, and /usr/share/lib.
#
# Note also that retest is used strictly as a test program and is never
# installed. We omit it here, so that the NSE doesn't spend cycles
# on it when acquiring and reconciling.
#
PROG= $(KSHPROG)
LIBPROG= $(VFONTEDPR) $(LANGDEFS)
TMACPROG= $(MACROS)
VFONTEDPROBJS= vfontedpr.o vgrindefs.o regexp.o
RETESTOBJS= retest.o regexp.o
RETESTSRC= $(RETESTOBJS:%.o=%.c)
OBJS= $(VFONTEDPROBJS) $(RETESTOBJS)
SRCS= $(OBJS:%.o=%.c)
#
# We can get away simply with omitting TMACPROGS to protect
# tmac.vgrind, since it's the only entry in that macro.
#
CLOBBERFILES= $(LIBPROG) $(RETEST)
include ../Makefile.cmd
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += -_gcc=-Wno-unused-function
#
# Message catalog
#
POFILES= $(OBJS:%.o=%.po)
POFILE= vgrind.po
POFILE_KSH= vgrind_ksh.po
#
# Abbreviation for future use.
#
ROOTTMAC= $(ROOT)/usr/share/lib/tmac
#
# Override macro definitions from Makefile.cmd. Necessary because
# we're building targets for multiple destinations.
#
ROOTLIBPROG= $(LIBPROG:%=$(ROOT)/usr/lib/%)
ROOTTMACPROG= $(TMACPROG:%=$(ROOTTMAC)/%)
#
# Conditional assignments pertinent to installation.
#
$(ROOTLIB)/$(LANGDEFS) := FILEMODE= $(LIBFILEMODE)
$(ROOTTMACPROG) := FILEMODE= 0644
#
# The standard set of rules doesn't know about installing into
# subdirectories of /usr/share/lib, so we have to roll our own.
#
$(ROOTTMAC)/%: %
$(INS.file)
.KEEP_STATE:
#
# retest appears here only in source form; see comment above for PROG.
#
all: $(PROG) $(LIBPROG) $(TMACPROG) $(RETESTSRC)
#
# message catalog
#
$(POFILE): $(POFILES) $(POFILE_KSH)
rm -f $@
cat $(POFILES) $(POFILE_KSH) > $@
$(VFONTEDPR): $(VFONTEDPROBJS)
$(CC) -o $@ $(VFONTEDPROBJS) $(LDFLAGS) $(LDLIBS)
$(POST_PROCESS)
$(LANGDEFS): $(LANGDEFS).src
$(CP) $? $@
$(RETEST): $(RETESTOBJS)
$(CC) -o $@ $(RETESTOBJS) $(LDFLAGS) $(LDLIBS)
$(POST_PROCESS)
#
# We add all as a dependent to make sure that the install pattern
# matching rules see everything they should. (This is a safety net.)
#
# XXX: ROOTTMAC shouldn't appear as a dependent; it's here as a
# bandaid(TM) until /usr/lib/tmac becomes a symlink to
# /usr/share/lib/tmac.
#
install: all $(ROOTTMAC) $(ROOTPROG) $(ROOTLIBPROG) $(ROOTTMACPROG)
# XXX: see above.
$(ROOTTMAC):
$(INS.dir)
clean:
$(RM) $(OBJS)
#
# Don't worry about linting retest.
#
lint:= SRCS = $(VFONTEDPROBJS:%.o=%.c)
lint: lint_SRCS
include ../Makefile.targ
|