xref: /titanic_41/usr/src/cmd/oamuser/lib/Makefile (revision d58fda4376e4bf67072ce2e69f6f47036f9dbb68)
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 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# cmd/oamuser/lib/Makefile
29#
30LIBRARY= 	lib.a
31
32DATEFILE= 	ugdates
33DATEFILESRC= 	ugdates.dat
34TXT= 		$(DATEFILESRC)
35
36OBJECTS= 	putgrent.o \
37		errmsg.o \
38		file.o \
39		vgid.o \
40		vgname.o \
41		vgroup.o \
42		vuid.o \
43		get_ngm.o \
44		vlogin.o \
45		vproj.o \
46		dates.o \
47		vexpire.o \
48		putprojent.o \
49		vprojid.o \
50		vprojname.o
51
52# include library definitions
53include ../../Makefile.cmd
54include ../../../lib/Makefile.lib
55
56GREP= 		grep
57FILEMODE=	$(LIBFILEMODE)
58
59PRODUCT=	$(LIBRARY) $(DATEFILE)
60
61# Must retain `lib', since default expands to nothing
62LLINTLIB=	llib-l$(LIBRARY:lib%.a=lib).ln
63
64CLEANFILES=	$(LLINTLIB)
65CLOBBERFILES=	$(DATEFILE)
66
67GENERAL=	../inc
68CPPFLAGS=	-I. -I$(GENERAL) $(CPPFLAGS.master)
69ARFLAGS=	cr
70AROBJS=		`$(LORDER) $(OBJS) | $(TSORT)`
71LINTFLAGS=	-u
72
73ROOTUSRSADM=	$(ROOT)/usr/sadm
74ROOTUSRSADMFILE=$(DATEFILE:%=$(ROOTUSRSADM)/%)
75
76.KEEP_STATE:
77
78all:		$(PRODUCT) $(TXT)
79
80$(DATEFILE):	$(DATEFILESRC)
81	$(GREP) -v "^#ident" $(DATEFILESRC) > $(DATEFILE)
82
83install:	all $(DATEFILE) $(ROOTUSRSADMFILE)
84
85$(ROOTUSRSADM)/%: %
86	$(INS.file)
87
88lint:		$(LLINTLIB)
89
90$(LLINTLIB):	$(SRCS)
91	$(LINT.c) -o $(LIBRARY:lib%.a=lib) $(SRCS) > $(LINTOUT) 2>&1
92
93include ../../../lib/Makefile.targ
94