xref: /illumos-gate/usr/src/cmd/nscd/Makefile (revision d8a7fe16f62711cdc5c4267da8b34ff24a6b668c)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Makefile for name service cache daemon
26#
27
28PROG=		nscd
29MANIFEST=	name-service-cache.xml
30SVCMETHOD=	svc-nscd
31
32include ../Makefile.cmd
33
34ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
35
36OBJS=	server.o getpw.o getgr.o gethost.o getnode.o \
37	getether.o getrpc.o getproto.o getnet.o \
38	getbootp.o getauuser.o getauth.o getserv.o \
39	getnetmasks.o getprinter.o getproject.o \
40	getexec.o getprof.o getuser.o cache.o \
41	nscd_biggest.o nscd_wait.o \
42	nscd_init.o nscd_access.o nscd_cfgfile.o nscd_config.o \
43	nscd_dbimpl.o nscd_getentctx.o nscd_intaddr.o \
44	nscd_log.o nscd_nswconfig.o nscd_nswstate.o nscd_nswcfgst.o \
45	nscd_seqnum.o nscd_smfmonitor.o \
46	nscd_switch.o nscd_nswparse.o nscd_initf.o nscd_selfcred.o \
47	nscd_frontend.o nscd_admin.o nscd_door.o \
48	gettnrhtp.o gettnrhdb.o
49
50CLOBBERFILES=	nscd
51
52SRCS=	${OBJS:%.o=%.c}
53
54CFLAGS +=	$(CCVERBOSE)
55CPPFLAGS +=	-D_REENTRANT -DSUN_THREADS \
56		-I../../lib/libc/port/gen -I../../lib/libc/inc \
57		-I../../lib/libsldap/common
58LINTFLAGS +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
59LINTFLAGS +=	-erroff=E_NAME_USED_NOT_DEF2
60LINTFLAGS +=	-erroff=E_NAME_DEF_NOT_USED2
61
62# nscd interposes on many symbols, and must export others for its own dlsym()
63# use, and dlsym() calls from libc.  Itemizing the interfaces within a mapfile
64# is error-prone, so establish the whole object as an interposer.
65LDFLAGS +=	$(ZINTERPOSE)
66
67# TCOV_FLAG=	-ql
68# GPROF_FLAG=	-xpg
69# DEBUG_FLAG=	-g
70
71PROGLIBS=	$(LDLIBS) -lresolv -lnsl -lsocket -lumem -lscf -lavl
72
73# install macros and rule
74#
75ROOTPROG=	${ROOTUSRSBIN}/nscd
76
77.KEEP_STATE:
78
79all: $(PROG) $(NISPROG)
80
81${PROG}: ${OBJS}
82	${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS}
83	${POST_PROCESS}
84
85lint:
86	$(LINT.c) ${SRCS} ${PROGLIBS}
87
88cstyle:
89	${CSTYLE} ${SRCS}
90
91install: all $(ROOTPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
92
93check:	$(CHKMANIFEST)
94
95clean:
96	${RM} ${OBJS}
97
98${ROOTUSRSBIN}/%: %
99	${INS.file}
100
101${ROOTUSRLIB}/%: %
102	${INS.file}
103
104include ../Makefile.targ
105