xref: /titanic_52/usr/src/cmd/nscd/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# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29PROG=	nscd
30NISPROG=	nscd_nischeck
31MANIFEST=	name-service-cache.xml
32SVCMETHOD=	svc-nscd
33
34include ../Makefile.cmd
35
36ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
37$(ROOTMANIFEST)		:= FILEMODE= 444
38
39$(ROOTMANIFESTDIR)/%: %
40		$(INS.file)
41
42OBJS=	server.o getpw.o getgr.o gethost.o getnode.o hash.o \
43	nscd_biggest.o nscd_parse.o nscd_wait.o \
44	getexec.o getprof.o getuser.o attrstr.o
45
46NISOBJS=	nscd_nischeck.o
47
48CLOBBERFILES=	nscd nscd_nischeck
49
50SRCS=	${OBJS:%.o=%.c}
51
52NISSRC=	${NISOBJS:%.o=%.c}
53
54CPPFLAGS += 	-D_REENTRANT -DSUN_THREADS
55
56# TCOV_FLAG=	-ql
57# GPROF_FLAG=	-xpg
58# DEBUG_FLAG=	-g
59
60$(PROG) :=	LDLIBS += -lresolv -lnsl -lsocket -lumem -lscf
61$(NISPROG) :=	LDLIBS += -lnsl
62
63# install macros and rule
64#
65GROUP=	bin
66ROOTPROG=	${ROOTUSRSBIN}/nscd
67ROOTNISPROG=	${ROOTLIB}/nscd_nischeck
68
69.KEEP_STATE:
70
71all: $(PROG) $(NISPROG)
72
73${PROG}: ${OBJS}
74	${LINK.c} ${OPT} -o $@ ${OBJS} ${LDLIBS}
75	${POST_PROCESS}
76
77${NISPROG}: ${NISOBJS}
78	${LINK.c} ${OPT} -o $@ ${NISOBJS} ${LDLIBS}
79	${POST_PROCESS}
80
81lint :=	LINTFLAGS=-x -b -u
82
83lint:
84	$(LINT.c) ${SRCS}
85
86lint2:
87	 $(LINT.c) ${NISSRC}
88
89cstyle:
90	${CSTYLE} ${SRCS} ${NISSRC}
91
92install: all $(ROOTPROG) $(ROOTNISPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
93
94check:	$(CHKMANIFEST)
95
96clean:
97	${RM} ${OBJS} ${NISOBJS}
98
99${ROOTUSRSBIN}/%: %
100	${INS.file}
101
102${ROOTUSRLIB}/%: %
103	${INS.file}
104
105
106
107include ../Makefile.targ
108
109
110
111