Merge illumos-gate
[unleashed/lotheac.git] / usr / src / cmd / nscd / Makefile
blob2a4dbaf6ceb50a61c6db055370ec20775ff6e4aa
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2018, Joyent, Inc.
25 # Makefile for name service cache daemon
28 PROG= nscd
29 MANIFEST= name-service-cache.xml
30 SVCMETHOD= svc-nscd
32 include ../Makefile.cmd
34 ROOTMANIFESTDIR= $(ROOTSVCSYSTEM)
36 OBJS= server.o getpw.o getgr.o gethost.o getnode.o \
37 getether.o getrpc.o getproto.o getnet.o \
38 getbootp.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
49 CLOBBERFILES= nscd
51 SRCS= ${OBJS:%.o=%.c}
53 CPPFLAGS += -DSUN_THREADS \
54 -I../../lib/libc/port/gen -I../../lib/libc/inc \
55 -I../../lib/libsldap/common
57 CERRWARN += -Wno-switch
58 CERRWARN += -Wno-uninitialized
59 CERRWARN += -Wno-parentheses
60 CERRWARN += -Wno-type-limits
62 # not linted
63 SMATCH=off
65 # nscd interposes on many symbols, and must export others for its own dlsym()
66 # use, and dlsym() calls from libc. Itemizing the interfaces within a mapfile
67 # is error-prone, so establish the whole object as an interposer.
68 LDFLAGS += $(ZINTERPOSE)
70 # TCOV_FLAG= -ql
71 # GPROF_FLAG= -pg
72 # DEBUG_FLAG= -g
74 PROGLIBS= $(LDLIBS) -lresolv -lumem -lscf -lavl
76 # install macros and rule
78 ROOTPROG= ${ROOTUSRSBIN}/nscd
80 .KEEP_STATE:
82 all: $(PROG) $(NISPROG)
84 ${PROG}: ${OBJS}
85 ${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS}
86 ${POST_PROCESS}
88 cstyle:
89 ${CSTYLE} ${SRCS}
91 install: all $(ROOTPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
93 check: $(CHKMANIFEST)
95 clean:
96 ${RM} ${OBJS}
98 ${ROOTUSRSBIN}/%: %
99 ${INS.file}
101 ${ROOTUSRLIB}/%: %
102 ${INS.file}
104 include ../Makefile.targ