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$(ROOTMANIFEST) := FILEMODE= 444 39 40$(ROOTMANIFESTDIR)/%: % 41 $(INS.file) 42 43OBJS= server.o getpw.o getgr.o gethost.o getnode.o \ 44 getether.o getrpc.o getproto.o getnet.o \ 45 getbootp.o getauuser.o getauth.o getserv.o \ 46 getnetmasks.o getprinter.o getproject.o \ 47 getexec.o getprof.o getuser.o cache.o \ 48 nscd_biggest.o nscd_wait.o \ 49 nscd_init.o nscd_access.o nscd_cfgfile.o nscd_config.o \ 50 nscd_dbimpl.o nscd_getentctx.o nscd_intaddr.o \ 51 nscd_log.o nscd_nswconfig.o nscd_nswstate.o nscd_nswcfgst.o \ 52 nscd_seqnum.o nscd_smfmonitor.o \ 53 nscd_switch.o nscd_nswparse.o nscd_initf.o nscd_selfcred.o \ 54 nscd_frontend.o nscd_admin.o nscd_door.o \ 55 gettnrhtp.o gettnrhdb.o 56 57NISOBJS= nscd_nischeck.o 58 59CLOBBERFILES= nscd nscd_nischeck 60 61SRCS= ${OBJS:%.o=%.c} 62 63NISSRC= ${NISOBJS:%.o=%.c} 64 65CFLAGS += $(CCVERBOSE) 66CPPFLAGS += -D_REENTRANT -DSUN_THREADS \ 67 -I../../lib/libc/port/gen -I../../lib/libc/inc \ 68 -I../../lib/libsldap/common 69LINTFLAGS += -erroff=E_GLOBAL_COULD_BE_STATIC2 70LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 71LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 72 73# TCOV_FLAG= -ql 74# GPROF_FLAG= -xpg 75# DEBUG_FLAG= -g 76 77PROGLIBS= $(LDLIBS) -lresolv -lnsl -lsocket -lumem -lscf -lavl -lgss 78NISPROGLIBS= $(LDLIBS) -lnsl 79 80# install macros and rule 81# 82GROUP= bin 83ROOTPROG= ${ROOTUSRSBIN}/nscd 84ROOTNISPROG= ${ROOTLIB}/nscd_nischeck 85 86.KEEP_STATE: 87 88all: $(PROG) $(NISPROG) 89 90${PROG}: ${OBJS} 91 ${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS} 92 ${POST_PROCESS} 93 94${NISPROG}: ${NISOBJS} 95 ${LINK.c} ${OPT} -o $@ ${NISOBJS} ${NISPROGLIBS} 96 ${POST_PROCESS} 97 98lint: 99 $(LINT.c) ${SRCS} ${PROGLIBS} 100 $(LINT.c) ${NISSRC} ${NISPROGLIBS} 101 102cstyle: 103 ${CSTYLE} ${SRCS} ${NISSRC} 104 105install: all $(ROOTPROG) $(ROOTNISPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) 106 107check: $(CHKMANIFEST) 108 109clean: 110 ${RM} ${OBJS} ${NISOBJS} 111 112${ROOTUSRSBIN}/%: % 113 ${INS.file} 114 115${ROOTUSRLIB}/%: % 116 ${INS.file} 117 118include ../Makefile.targ 119