xref: /titanic_50/usr/src/cmd/ldapcachemgr/Makefile (revision 407eb7cc0bcf1bc14f8cd498d68af0782e777f74)
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
28PROG=	ldap_cachemgr
29
30MANIFEST=	client.xml
31
32include ../Makefile.cmd
33
34#
35# To compile in the $mgr SLP support
36# 1. add -DSLP in to CPPFLAGS line
37# 2. add cachemgr_discovery.o to the OBJS line
38# 3. add -lslp in the LDLIBS line
39#
40
41ROOTLDAPLIB=	$(ROOT)/usr/lib/ldap
42ROOTLDAPPROG=	$(PROG:%=$(ROOTLDAPLIB)/%)
43
44ROOTMANIFESTDIR=	$(ROOTSVCNETWORKLDAP)
45$(ROOTMANIFEST)		:= FILEMODE= 444
46
47OBJS=	cachemgr.o cachemgr_getldap.o cachemgr_parse.o
48
49SRCS=	${OBJS:%.o=%.c}
50
51CPPFLAGS += 	-D_REENTRANT -DSUN_THREADS \
52		-I../../lib/libsldap/common -I../../lib/libldap5/include/ldap
53
54# Message files
55POFILE=		ldap_cachemgr.po
56POFILES=	${OBJS:%.o=%.po}
57
58LINTOUT=        lint.out
59
60# TCOV_FLAG=	-ql
61# GPROF_FLAG=	-xpg
62# DEBUG_FLAG=	-g
63
64LDLIBS += 	-lsldap -lldap -lnsl
65
66# install macros and rule
67#
68GROUP=	bin
69OWNER=	root
70
71.KEEP_STATE:
72
73clean := TARGET= clean
74clobber := TARGET= clobber
75
76
77all: $(PROG)
78
79${PROG}: ${OBJS}
80	${LINK.c} ${OPT} -o $@ ${OBJS} ${LDLIBS}
81	${POST_PROCESS}
82
83$(ROOTLDAPLIB):
84	$(INS.dir)
85
86$(ROOTLDAPLIB)/%:	%
87	$(INS.file)
88
89lint :=	LINTFLAGS=-x -b -u -h
90
91lint:
92	$(LINT.c) ${SRCS}  > $(LINTOUT) 2>&1
93
94cstyle:
95	${CSTYLE} ${SRCS}
96
97install: all $(ROOTLDAPLIB) $(ROOTLDAPPROG) $(ROOTMANIFEST)
98
99check:	$(CHKMANIFEST)
100
101clean:
102	${RM} ${OBJS} ${POFILE} ${POFILES}
103
104$(POFILE): $(POFILES)
105	$(RM) $@
106	cat $(POFILES) > $@
107
108include $(SRC)/cmd/Makefile.targ
109