xref: /titanic_50/usr/src/cmd/ldapcachemgr/Makefile (revision b6805bf78d2bbbeeaea8909a05623587b42d58b3)
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#
2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gatePROG=	ldap_cachemgr
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateMANIFEST=	client.xml
299e2871ecSrm88369SVCMETHOD=	ldap-client
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gate# To compile in the $mgr SLP support
357c478bd9Sstevel@tonic-gate# 1. add -DSLP in to CPPFLAGS line
367c478bd9Sstevel@tonic-gate# 2. add cachemgr_discovery.o to the OBJS line
377c478bd9Sstevel@tonic-gate# 3. add -lslp in the LDLIBS line
387c478bd9Sstevel@tonic-gate#
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gateROOTLDAPLIB=	$(ROOT)/usr/lib/ldap
417c478bd9Sstevel@tonic-gateROOTLDAPPROG=	$(PROG:%=$(ROOTLDAPLIB)/%)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKLDAP)
447c478bd9Sstevel@tonic-gate
45e1dd0a2fSth160488OBJS=	cachemgr.o cachemgr_getldap.o cachemgr_parse.o cachemgr_change.o
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateSRCS=	${OBJS:%.o=%.c}
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gateCPPFLAGS += 	-D_REENTRANT -DSUN_THREADS \
508142c2b2Schinlong		-I$(SRC)/lib/libsldap/common \
518142c2b2Schinlong		-I$(SRC)/lib/libldap5/include/ldap \
528142c2b2Schinlong		-I$(SRC)/lib/libc/port/gen
537c478bd9Sstevel@tonic-gate
547014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
557014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
567014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
577014882cSRichard Lowe
587c478bd9Sstevel@tonic-gate# Message files
597c478bd9Sstevel@tonic-gatePOFILE=		ldap_cachemgr.po
607c478bd9Sstevel@tonic-gatePOFILES=	${OBJS:%.o=%.po}
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateLINTOUT=        lint.out
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate# TCOV_FLAG=	-ql
657c478bd9Sstevel@tonic-gate# GPROF_FLAG=	-xpg
667c478bd9Sstevel@tonic-gate# DEBUG_FLAG=	-g
677c478bd9Sstevel@tonic-gate
68e1dd0a2fSth160488LDLIBS += 	-lumem -lsldap
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate# install macros and rule
717c478bd9Sstevel@tonic-gate#
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate.KEEP_STATE:
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateclean := TARGET= clean
767c478bd9Sstevel@tonic-gateclobber := TARGET= clobber
777c478bd9Sstevel@tonic-gate
789e2871ecSrm88369$(ROOTSVCMETHOD) := FILEMODE = 0555
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gateall: $(PROG)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate${PROG}: ${OBJS}
837c478bd9Sstevel@tonic-gate	${LINK.c} ${OPT} -o $@ ${OBJS} ${LDLIBS}
847c478bd9Sstevel@tonic-gate	${POST_PROCESS}
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate$(ROOTLDAPLIB):
877c478bd9Sstevel@tonic-gate	$(INS.dir)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate$(ROOTLDAPLIB)/%:	%
907c478bd9Sstevel@tonic-gate	$(INS.file)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gatelint :=	LINTFLAGS=-x -b -u -h
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gatelint:
957c478bd9Sstevel@tonic-gate	$(LINT.c) ${SRCS}  > $(LINTOUT) 2>&1
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gatecstyle:
987c478bd9Sstevel@tonic-gate	${CSTYLE} ${SRCS}
997c478bd9Sstevel@tonic-gate
1009e2871ecSrm88369install: all $(ROOTLDAPLIB) $(ROOTLDAPPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gateclean:
105*b6805bf7SGordon Ross	$(RM) $(OBJS) $(LINTOUT)
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES)
1087c478bd9Sstevel@tonic-gate	$(RM) $@
1097c478bd9Sstevel@tonic-gate	cat $(POFILES) > $@
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.targ
112