Makefile revision 2830:5228d1267a01
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 57 58 59NISOBJS= nscd_nischeck.o 60 61CLOBBERFILES= nscd nscd_nischeck 62 63SRCS= ${OBJS:%.o=%.c} 64 65NISSRC= ${NISOBJS:%.o=%.c} 66 67CPPFLAGS += -D_REENTRANT -DSUN_THREADS \ 68 -I../../lib/libc/port/gen -I../../lib/libc/inc \ 69 -I../../lib/libsldap/common 70LINTFLAGS += -erroff=E_GLOBAL_COULD_BE_STATIC2 71LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 72LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 73 74# TCOV_FLAG= -ql 75# GPROF_FLAG= -xpg 76# DEBUG_FLAG= -g 77 78$(PROG) := LDLIBS += -lresolv -lnsl -lsocket -lumem -lscf -lavl -lgss 79$(NISPROG) := LDLIBS += -lnsl 80 81# install macros and rule 82# 83GROUP= bin 84ROOTPROG= ${ROOTUSRSBIN}/nscd 85ROOTNISPROG= ${ROOTLIB}/nscd_nischeck 86 87.KEEP_STATE: 88 89all: $(PROG) $(NISPROG) 90 91${PROG}: ${OBJS} 92 ${LINK.c} ${OPT} -o $@ ${OBJS} ${LDLIBS} 93 ${POST_PROCESS} 94 95${NISPROG}: ${NISOBJS} 96 ${LINK.c} ${OPT} -o $@ ${NISOBJS} ${LDLIBS} 97 ${POST_PROCESS} 98 99lint: 100 $(LINT.c) ${SRCS} 101 102lint2: 103 $(LINT.c) ${NISSRC} 104 105cstyle: 106 ${CSTYLE} ${SRCS} ${NISSRC} 107 108install: all $(ROOTPROG) $(ROOTNISPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) 109 110check: $(CHKMANIFEST) 111 112clean: 113 ${RM} ${OBJS} ${NISOBJS} 114 115${ROOTUSRSBIN}/%: % 116 ${INS.file} 117 118${ROOTUSRLIB}/%: % 119 ${INS.file} 120 121 122 123include ../Makefile.targ 124 125 126 127