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