xref: /illumos-gate/usr/src/cmd/ldapcachemgr/Makefile (revision 4e93fb0f6383eaac21897dcdae56b87118131e4d)
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
46OBJS=	cachemgr.o cachemgr_getldap.o cachemgr_parse.o
47
48SRCS=	${OBJS:%.o=%.c}
49
50CPPFLAGS += 	-D_REENTRANT -DSUN_THREADS \
51		-I../../lib/libsldap/common -I../../lib/libldap5/include/ldap
52
53# Message files
54POFILE=		ldap_cachemgr.po
55POFILES=	${OBJS:%.o=%.po}
56
57LINTOUT=        lint.out
58
59# TCOV_FLAG=	-ql
60# GPROF_FLAG=	-xpg
61# DEBUG_FLAG=	-g
62
63LDLIBS += 	-lsldap -lldap -lnsl
64
65# install macros and rule
66#
67GROUP=	bin
68OWNER=	root
69
70.KEEP_STATE:
71
72clean := TARGET= clean
73clobber := TARGET= clobber
74
75
76all: $(PROG)
77
78${PROG}: ${OBJS}
79	${LINK.c} ${OPT} -o $@ ${OBJS} ${LDLIBS}
80	${POST_PROCESS}
81
82$(ROOTLDAPLIB):
83	$(INS.dir)
84
85$(ROOTLDAPLIB)/%:	%
86	$(INS.file)
87
88lint :=	LINTFLAGS=-x -b -u -h
89
90lint:
91	$(LINT.c) ${SRCS}  > $(LINTOUT) 2>&1
92
93cstyle:
94	${CSTYLE} ${SRCS}
95
96install: all $(ROOTLDAPLIB) $(ROOTLDAPPROG) $(ROOTMANIFEST)
97
98check:	$(CHKMANIFEST)
99
100clean:
101	${RM} ${OBJS} ${POFILE} ${POFILES}
102
103$(POFILE): $(POFILES)
104	$(RM) $@
105	cat $(POFILES) > $@
106
107include $(SRC)/cmd/Makefile.targ
108