xref: /titanic_41/usr/src/cmd/valtools/Makefile (revision 66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# cmd/valtools/Makefile
29#
30
31PROG= ckint ckitem ckpath ckrange ckstr ckyorn \
32      ckkeywd ckdate cktime ckuid ckgid
33
34POFILES= ckdate.po ckgid.po ckint.po ckitem.po \
35	ckkeywd.po ckpath.po ckrange.po ckstr.po \
36	cktime.po ckuid.po ckyorn.po puttext.po
37
38include ../Makefile.cmd
39
40LIBADMDIR=	../../lib/libadm/inc
41CPPFLAGS +=	-I$(LIBADMDIR)
42CFLAGS +=	$(CCVERBOSE)
43LDLIBS += -ladm
44POFILE= valtools.po
45CLOBBERFILES +=	puttext $(POFILES) $(POFILE)
46CLEANFILES += puttext
47
48VCKS=	valint helpint errint  \
49	helpitem erritem  \
50        valpath helppath errpath  \
51	valrange helprange errange  \
52	valstr helpstr errstr  \
53	valyorn helpyorn erryorn  \
54	valtime helptime errtime  \
55	valdate helpdate errdate  \
56	dispuid valuid helpuid erruid  \
57	dispgid valgid helpgid errgid
58
59DISPS=	dispuid dispgid
60
61ROOTSADMDIR=	$(ROOT)/usr/sadm/bin
62
63ROOTPUTTEXT=	$(ROOTSADMDIR)/puttext
64ROOTVCKS=	$(VCKS:%=$(ROOTSADMDIR)/%)
65ROOTDISPS=	$(DISPS:%=$(ROOTBIN)/%)
66
67
68# valtool install rules
69$(ROOTSADMDIR)/%: %
70	$(INS.file)
71
72# there is a special case here for errange
73#
74$(ROOTSADMDIR)/disp% \
75$(ROOTSADMDIR)/val% \
76$(ROOTSADMDIR)/help% \
77$(ROOTSADMDIR)/err% \
78$(ROOTSADMDIR)/er% \
79$(ROOTBIN)/disp%: $(ROOTBIN)/ck%
80	$(RM) $@; $(LN) $< $@
81
82
83.KEEP_STATE:
84
85.PARALLEL:	 $(PROG) puttext
86
87all: $(PROG) puttext
88
89install: all $(ROOTSADMDIR) $(ROOTPROG) $(ROOTPUTTEXT) $(ROOTVCKS) $(ROOTDISPS)
90
91$(ROOTSADMDIR):
92	$(INS.dir)
93
94$(POFILE):	$(POFILES)
95	$(RM) $@
96	cat $(POFILES) > $@
97
98clean:
99
100lint:
101	$(LINT.c) ckint.c   $(LDLIBS)
102	$(LINT.c) ckitem.c  $(LDLIBS)
103	$(LINT.c) ckpath.c  $(LDLIBS)
104	$(LINT.c) ckrange.c $(LDLIBS)
105	$(LINT.c) ckstr.c   $(LDLIBS)
106	$(LINT.c) ckyorn.c  $(LDLIBS)
107	$(LINT.c) ckkeywd.c $(LDLIBS)
108	$(LINT.c) ckdate.c  $(LDLIBS)
109	$(LINT.c) cktime.c  $(LDLIBS)
110	$(LINT.c) ckuid.c   $(LDLIBS)
111	$(LINT.c) ckgid.c   $(LDLIBS)
112	$(LINT.c) puttext.c $(LDLIBS)
113
114include ../Makefile.targ
115