xref: /titanic_44/usr/src/lib/libldap5/Makefile.com (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
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#
28# lib/libldap5/Makefile.com
29#
30
31LIBRARY= libldap.a
32VERS= .5
33
34# Definition of all the objects macros
35# The LDAP specific objects
36
37BEROBJS=	bprint.o	decode.o 	encode.o       io.o
38
39LDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
40        charset.o compare.o compat.o control.o countvalues.o \
41        delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
42        friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
43        getfilter.o getoption.o getvalues.o memcache.o message.o \
44        modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
45        rename.o request.o reslist.o result.o saslbind.o sasl.o \
46        sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
47        tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
48        cram_md5.o secutil.o spagectrl.o digest_md5.o
49
50SSLDAPOBJS=	clientinit.o ldapsinit.o errormap.o
51
52PRLDAPOBJS=	ldappr-dns.o	ldappr-error.o	ldappr-public.o \
53		ldappr-io.o	ldappr-threads.o
54
55UTILOBJS= log.o line64.o
56
57# Grouping it all together
58OBJECTS=	$(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
59		$(UTILOBJS)
60
61# include library definitions
62include ../../Makefile.lib
63
64NSS_LIBS=	-lnspr4 -lplc4 -lnss3 -lssl3
65NSS_HDRS=	/usr/include/mps
66NSS_LDPATH=	/usr/lib/mps
67NSS_LDPATH64=	$(NSS_LDPATH)/64
68
69
70LDAP_FLAGS=     -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
71                -D_SOLARIS_SDK \
72                -DUSE_WAITPID -DNEEDPROTOS \
73                -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
74                -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
75                -DLDAP_SASLIO_HOOKS
76
77
78# Include directories for all files
79COM_INC=	-I$(SRC)/lib/libldap5/include/ldap \
80		-I$(NSS_HDRS)
81
82SRCS=		$(BEROBJS:%.o=../sources/ldap/ber/%.c) \
83		$(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
84		$(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
85		$(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
86		$(UTILOBJS:%.o=../sources/ldap/util/%.c)
87
88LIBS =		$(DYNLIB) $(LINTLIB)
89DYNFLAGS +=	$(ZNODELETE)
90
91CPPFLAGS=	$(COM_INC) $(CPPFLAGS.master)
92
93# definitions for lint
94
95$(LINTLIB):= 	SRCS=../sources/ldap/common/llib-lldap
96$(LINTLIB):= 	LINTFLAGS=-nvx
97$(LINTLIB):= 	TARGET_ARCH=
98
99LINTOUT=	lint.out
100
101LINTSRC=	$(LINTLIB:%.ln=%)
102ROOTLINTDIR=	$(ROOTLIBDIR)
103ROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
104
105
106CLEANFILES += 	$(LINTOUT) $(LINTLIB)
107CLOBBERFILES +=	$(MAPFILE)
108
109# Local Libldap definitions
110LOCFLAGS +=	 $(XSTRCONST) -D_REENTRANT
111
112# Following values defined in Makefile.master are overwritten here.
113#sparc_C_PICFLAGS =	$(sparc_C_BIGPICFLAGS)
114sparcv9_C_PICFLAGS =	$(sparcv9_C_BIGPICFLAGS)
115#i386_C_PICFLAGS =	$(i386_C_BIGPICFLAGS)
116#amd64_C_PICFLAGS =	$(amd64_C_BIGPICFLAGS)
117
118MAPDIR = 	../spec/$(TRANSMACH)
119SPECMAPFILE =	$(MAPDIR)/mapfile
120
121CFLAGS +=	$(CCVERBOSE) $(LOCFLAGS)
122CFLAGS64 +=	$(LOCFLAGS)
123LDLIBS +=	-lsasl -lsocket -lnsl -lmd -lc
124
125.KEEP_STATE:
126
127# include library targets
128include ../../Makefile.targ
129
130pics/%.o: ../sources/ldap/ber/%.c
131	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
132	$(POST_PROCESS_O)
133
134pics/%.o: ../sources/ldap/common/%.c
135	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
136	$(POST_PROCESS_O)
137
138pics/%.o: ../sources/ldap/ssldap/%.c
139	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
140	$(POST_PROCESS_O)
141
142pics/%.o: ../sources/ldap/prldap/%.c
143	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
144	$(POST_PROCESS_O)
145
146pics/%.o: ../sources/ldap/util/%.c
147	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
148	$(POST_PROCESS_O)
149
150# install rule for lint library target
151$(ROOTLINTDIR)/%: ../sources/ldap/common/%
152	$(INS.file)
153