xref: /onnv-gate/usr/src/lib/libldap4/Makefile.com (revision 2522:79989c8fe091)
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
28LIBRARY= libldap.a
29VERS= .4
30
31LDAPOBJS=	abandon.o             getentry.o            referral.o \
32		add.o                 getfilter.o           regex.o \
33		addentry.o            getmsg.o              rename.o \
34		bind.o                getref.o              request.o \
35		cache.o               getvalues.o           result.o \
36		charset.o             kbind.o               saslbind.o \
37		cldap.o               sbind.o 		    compare.o    \
38		search.o 	      controls.o            sort.o \
39		delete.o              srchpref.o	    disptmpl.o \
40		tmplout.o 	      dsparse.o             \
41		error.o               ufn.o \
42		extensions.o          unbind.o 	            extop.o    \
43		url.o         \
44		free.o   modify.o              utils.o \
45		friendly.o            modrdn.o    notif.o    Version.o \
46		getattr.o             open.o                \
47		getdn.o               option.o \
48		getdxbyname.o         os-ip.o               sortctrl.o \
49		vlistctrl.o
50
51BEROBJS=	bprint.o	      decode.o \
52		encode.o 	   \
53		io.o		      i18n.o
54
55UTILOBJS=	line64.o	log.o
56
57
58SECOBJS=	cram_md5.o	secutil.o
59
60OBJECTS=	$(LDAPOBJS)	$(BEROBJS)	$(UTILOBJS)	$(SECOBJS)
61
62include ../../Makefile.lib
63
64LDAPINC=	$(SRC)/lib/libldap4/include
65LDAP_FLAGS=	-DLDAP_REFERRALS -DCLDAP -DLDAP_DNS -DSUN
66
67SRCDIR =	../common
68SRCS=		$(LDAPOBJS:%.o=../common/%.c)	$(BEROBJS:%.o=../ber/%.c) \
69		$(UTILOBJS:%.o=../util/%.c)	$(SECOBJS:%.o=../sec/%.c)
70
71LIBS =		$(DYNLIB)
72
73$(LINTLIB):= 	SRCS=../common/llib-lldap
74
75LINTSRC=	$(LINTLIB:%.ln=%)
76ROOTLINTDIR=	$(ROOTLIBDIR)
77ROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
78
79
80CLEANFILES += 	$(LINTOUT) $(LINTLIB)
81
82# Local Libldap definitions
83
84LOCFLAGS +=	-D_SYS_STREAM_H -D_REENTRANT -DSVR4 -DSUNW_OPTIONS \
85		-DTHREAD_SUNOS5_LWP -DSOUNDEX -DSTR_TRANSLATION \
86		$(LDAP_FLAGS) -I$(LDAPINC)
87
88CPPFLAGS =	$(LOCFLAGS) $(CPPFLAGS.master)
89CFLAGS +=	$(CCVERBOSE)
90LDLIBS +=	-lsocket -lnsl -lresolv -lc -lmd
91
92.KEEP_STATE:
93
94lint: lintcheck
95
96# include library targets
97include ../../Makefile.targ
98
99objs/%.o pics/%.o: ../common/%.c
100	$(COMPILE.c) -o $@ $<
101	$(POST_PROCESS_O)
102
103objs/%.o pics/%.o: ../ber/%.c
104	$(COMPILE.c) -o $@ $<
105	$(POST_PROCESS_O)
106
107objs/%.o pics/%.o: ../util/%.c
108	$(COMPILE.c) -o $@ $<
109	$(POST_PROCESS_O)
110
111objs/%.o pics/%.o: ../sec/%.c
112	$(COMPILE.c) -o $@ $<
113	$(POST_PROCESS_O)
114