xref: /titanic_50/usr/src/cmd/oamuser/lib/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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 (c) 1990-2000 by Sun Microsystems, Inc.
26# All rights reserved.
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		prerrno.o \
49		putprojent.o \
50		vprojid.o \
51		vprojname.o
52
53# include library definitions
54include ../../Makefile.cmd
55include ../../../lib/Makefile.lib
56
57GREP= 		grep
58FILEMODE=	$(LIBFILEMODE)
59
60PRODUCT=	$(LIBRARY) $(DATEFILE)
61
62# Must retain `lib', since default expands to nothing
63LLINTLIB=	llib-l$(LIBRARY:lib%.a=lib).ln
64
65CLEANFILES=	$(LLINTLIB)
66CLOBBERFILES=	$(DATEFILE)
67
68GENERAL=	../inc
69CPPFLAGS=	-I. -I$(GENERAL) $(CPPFLAGS.master)
70ARFLAGS=	cr
71AROBJS=		`$(LORDER) $(OBJS) | $(TSORT)`
72LINTFLAGS=	-u
73
74ROOTUSRSADM=	$(ROOT)/usr/sadm
75ROOTUSRSADMFILE=$(DATEFILE:%=$(ROOTUSRSADM)/%)
76
77.KEEP_STATE:
78
79all:		$(PRODUCT) $(TXT)
80
81$(DATEFILE):	$(DATEFILESRC)
82	$(GREP) -v "^#ident" $(DATEFILESRC) > $(DATEFILE)
83
84install:	all $(DATEFILE) $(ROOTUSRSADMFILE)
85
86$(ROOTUSRSADM)/%: %
87	$(INS.file)
88
89lint:		$(LLINTLIB)
90
91$(LLINTLIB):	$(SRCS)
92	$(LINT.c) -o $(LIBRARY:lib%.a=lib) $(SRCS) > $(LINTOUT) 2>&1
93
94include ../../../lib/Makefile.targ
95