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