xref: /titanic_44/usr/src/cmd/nscd/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5cb5caa98Sdjl# Common Development and Distribution License (the "License").
6cb5caa98Sdjl# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
2207925104Sgww# Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate#
24cb5caa98Sdjl# Makefile for name service cache daemon
25cb5caa98Sdjl#
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePROG=		nscd
287c478bd9Sstevel@tonic-gateMANIFEST=	name-service-cache.xml
297c478bd9Sstevel@tonic-gateSVCMETHOD=	svc-nscd
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
347c478bd9Sstevel@tonic-gate
35cb5caa98SdjlOBJS=	server.o getpw.o getgr.o gethost.o getnode.o \
36cb5caa98Sdjl	getether.o getrpc.o getproto.o getnet.o \
3707925104Sgww	getbootp.o getauth.o getserv.o \
38cb5caa98Sdjl	getnetmasks.o getprinter.o getproject.o \
39cb5caa98Sdjl	getexec.o getprof.o getuser.o cache.o \
40cb5caa98Sdjl	nscd_biggest.o nscd_wait.o \
41cb5caa98Sdjl	nscd_init.o nscd_access.o nscd_cfgfile.o nscd_config.o \
42cb5caa98Sdjl	nscd_dbimpl.o nscd_getentctx.o nscd_intaddr.o \
43cb5caa98Sdjl	nscd_log.o nscd_nswconfig.o nscd_nswstate.o nscd_nswcfgst.o \
44cb5caa98Sdjl	nscd_seqnum.o nscd_smfmonitor.o \
45cb5caa98Sdjl	nscd_switch.o nscd_nswparse.o nscd_initf.o nscd_selfcred.o \
46cb5caa98Sdjl	nscd_frontend.o nscd_admin.o nscd_door.o \
47cb5caa98Sdjl	gettnrhtp.o gettnrhdb.o
48cb5caa98Sdjl
4936e852a1SRaja AndraCLOBBERFILES=	nscd
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gateSRCS=	${OBJS:%.o=%.c}
527c478bd9Sstevel@tonic-gate
53ec2f0988SrafCFLAGS +=	$(CCVERBOSE)
54cb5caa98SdjlCPPFLAGS +=	-D_REENTRANT -DSUN_THREADS \
55cb5caa98Sdjl		-I../../lib/libc/port/gen -I../../lib/libc/inc \
56cb5caa98Sdjl		-I../../lib/libsldap/common
57cb5caa98SdjlLINTFLAGS +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
58cb5caa98SdjlLINTFLAGS +=	-erroff=E_NAME_USED_NOT_DEF2
59cb5caa98SdjlLINTFLAGS +=	-erroff=E_NAME_DEF_NOT_USED2
607c478bd9Sstevel@tonic-gate
61*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
62*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
63*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
64*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-type-limits
65*7014882cSRichard Lowe
6624da5b34Srie# nscd interposes on many symbols, and must export others for its own dlsym()
6724da5b34Srie# use, and dlsym() calls from libc.  Itemizing the interfaces within a mapfile
6824da5b34Srie# is error-prone, so establish the whole object as an interposer.
6924da5b34SrieLDFLAGS +=	$(ZINTERPOSE)
7024da5b34Srie
717c478bd9Sstevel@tonic-gate# TCOV_FLAG=	-ql
727c478bd9Sstevel@tonic-gate# GPROF_FLAG=	-xpg
737c478bd9Sstevel@tonic-gate# DEBUG_FLAG=	-g
747c478bd9Sstevel@tonic-gate
75c70a8a3bSmichenPROGLIBS=	$(LDLIBS) -lresolv -lnsl -lsocket -lumem -lscf -lavl
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gate# install macros and rule
787c478bd9Sstevel@tonic-gate#
797c478bd9Sstevel@tonic-gateROOTPROG=	${ROOTUSRSBIN}/nscd
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gate.KEEP_STATE:
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateall: $(PROG) $(NISPROG)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate${PROG}: ${OBJS}
86ec2f0988Sraf	${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS}
877c478bd9Sstevel@tonic-gate	${POST_PROCESS}
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gatelint:
90ec2f0988Sraf	$(LINT.c) ${SRCS} ${PROGLIBS}
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gatecstyle:
9336e852a1SRaja Andra	${CSTYLE} ${SRCS}
947c478bd9Sstevel@tonic-gate
9536e852a1SRaja Andrainstall: all $(ROOTPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateclean:
10036e852a1SRaja Andra	${RM} ${OBJS}
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate${ROOTUSRSBIN}/%: %
1037c478bd9Sstevel@tonic-gate	${INS.file}
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate${ROOTUSRLIB}/%: %
1067c478bd9Sstevel@tonic-gate	${INS.file}
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
109