xref: /titanic_41/usr/src/cmd/nscd/Makefile (revision 99ebb4ca412cb0a19d77a3899a87c055b9c30fa8)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# Makefile for name service cache daemon
28#
29
30PROG=		nscd
31NISPROG=	nscd_nischeck
32MANIFEST=	name-service-cache.xml
33SVCMETHOD=	svc-nscd
34
35include ../Makefile.cmd
36
37ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
38
39OBJS=	server.o getpw.o getgr.o gethost.o getnode.o \
40	getether.o getrpc.o getproto.o getnet.o \
41	getbootp.o getauuser.o getauth.o getserv.o \
42	getnetmasks.o getprinter.o getproject.o \
43	getexec.o getprof.o getuser.o cache.o \
44	nscd_biggest.o nscd_wait.o \
45	nscd_init.o nscd_access.o nscd_cfgfile.o nscd_config.o \
46	nscd_dbimpl.o nscd_getentctx.o nscd_intaddr.o \
47	nscd_log.o nscd_nswconfig.o nscd_nswstate.o nscd_nswcfgst.o \
48	nscd_seqnum.o nscd_smfmonitor.o \
49	nscd_switch.o nscd_nswparse.o nscd_initf.o nscd_selfcred.o \
50	nscd_frontend.o nscd_admin.o nscd_door.o \
51	gettnrhtp.o gettnrhdb.o
52
53NISOBJS=	nscd_nischeck.o
54
55CLOBBERFILES=	nscd nscd_nischeck
56
57SRCS=	${OBJS:%.o=%.c}
58
59NISSRC=	${NISOBJS:%.o=%.c}
60
61CFLAGS +=	$(CCVERBOSE)
62CPPFLAGS +=	-D_REENTRANT -DSUN_THREADS \
63		-I../../lib/libc/port/gen -I../../lib/libc/inc \
64		-I../../lib/libsldap/common
65LINTFLAGS +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
66LINTFLAGS +=	-erroff=E_NAME_USED_NOT_DEF2
67LINTFLAGS +=	-erroff=E_NAME_DEF_NOT_USED2
68
69# TCOV_FLAG=	-ql
70# GPROF_FLAG=	-xpg
71# DEBUG_FLAG=	-g
72
73PROGLIBS=	$(LDLIBS) -lresolv -lnsl -lsocket -lumem -lscf -lavl
74NISPROGLIBS=	$(LDLIBS) -lnsl
75
76# install macros and rule
77#
78GROUP=		bin
79ROOTPROG=	${ROOTUSRSBIN}/nscd
80ROOTNISPROG=	${ROOTLIB}/nscd_nischeck
81
82.KEEP_STATE:
83
84all: $(PROG) $(NISPROG)
85
86${PROG}: ${OBJS}
87	${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS}
88	${POST_PROCESS}
89
90${NISPROG}: ${NISOBJS}
91	${LINK.c} ${OPT} -o $@ ${NISOBJS} ${NISPROGLIBS}
92	${POST_PROCESS}
93
94lint:
95	$(LINT.c) ${SRCS} ${PROGLIBS}
96	$(LINT.c) ${NISSRC} ${NISPROGLIBS}
97
98cstyle:
99	${CSTYLE} ${SRCS} ${NISSRC}
100
101install: all $(ROOTPROG) $(ROOTNISPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
102
103check:	$(CHKMANIFEST)
104
105clean:
106	${RM} ${OBJS} ${NISOBJS}
107
108${ROOTUSRSBIN}/%: %
109	${INS.file}
110
111${ROOTUSRLIB}/%: %
112	${INS.file}
113
114include ../Makefile.targ
115