xref: /titanic_51/usr/src/lib/libldap5/Makefile.com (revision 494f7e12a62129ef191a15f9dfde6b7abe3bf510)
17c478bd9Sstevel@tonic-gate#
245916cd2Sjpk# CDDL HEADER START
345916cd2Sjpk#
445916cd2Sjpk# The contents of this file are subject to the terms of the
545916cd2Sjpk# Common Development and Distribution License (the "License").
645916cd2Sjpk# You may not use this file except in compliance with the License.
745916cd2Sjpk#
845916cd2Sjpk# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
945916cd2Sjpk# or http://www.opensolaris.org/os/licensing.
1045916cd2Sjpk# See the License for the specific language governing permissions
1145916cd2Sjpk# and limitations under the License.
1245916cd2Sjpk#
1345916cd2Sjpk# When distributing Covered Code, include this CDDL HEADER in each
1445916cd2Sjpk# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1545916cd2Sjpk# If applicable, add the following below this CDDL HEADER, with the
1645916cd2Sjpk# fields enclosed by brackets "[]" replaced with your own identifying
1745916cd2Sjpk# information: Portions Copyright [yyyy] [name of copyright owner]
1845916cd2Sjpk#
1945916cd2Sjpk# CDDL HEADER END
2045916cd2Sjpk#
2145916cd2Sjpk#
22f6acbf7cSrie# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateLIBRARY= libldap.a
277c478bd9Sstevel@tonic-gateVERS= .5
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate# Definition of all the objects macros
307c478bd9Sstevel@tonic-gate# The LDAP specific objects
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateBEROBJS=	bprint.o	decode.o 	encode.o       io.o
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateLDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
357c478bd9Sstevel@tonic-gate        charset.o compare.o compat.o control.o countvalues.o \
367c478bd9Sstevel@tonic-gate        delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
377c478bd9Sstevel@tonic-gate        friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
387c478bd9Sstevel@tonic-gate        getfilter.o getoption.o getvalues.o memcache.o message.o \
397c478bd9Sstevel@tonic-gate        modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
407c478bd9Sstevel@tonic-gate        rename.o request.o reslist.o result.o saslbind.o sasl.o \
417c478bd9Sstevel@tonic-gate        sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
427c478bd9Sstevel@tonic-gate        tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
437c478bd9Sstevel@tonic-gate        cram_md5.o secutil.o spagectrl.o digest_md5.o
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateSSLDAPOBJS=	clientinit.o ldapsinit.o errormap.o
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gatePRLDAPOBJS=	ldappr-dns.o	ldappr-error.o	ldappr-public.o \
487c478bd9Sstevel@tonic-gate		ldappr-io.o	ldappr-threads.o
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateUTILOBJS= log.o line64.o
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate# Grouping it all together
537c478bd9Sstevel@tonic-gateOBJECTS=	$(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
547c478bd9Sstevel@tonic-gate		$(UTILOBJS)
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gate# include library definitions
577c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateNSS_LIBS=	-lnspr4 -lplc4 -lnss3 -lssl3
60*494f7e12SKeith M WesolowskiNSS_HDRS=	$(ADJUNCT_PROTO)/usr/include/mps
617c478bd9Sstevel@tonic-gateNSS_LDPATH=	/usr/lib/mps
627c478bd9Sstevel@tonic-gateNSS_LDPATH64=	$(NSS_LDPATH)/64
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gateLDAP_FLAGS=     -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
667c478bd9Sstevel@tonic-gate                -D_SOLARIS_SDK \
677c478bd9Sstevel@tonic-gate                -DUSE_WAITPID -DNEEDPROTOS \
687c478bd9Sstevel@tonic-gate                -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
697c478bd9Sstevel@tonic-gate                -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
707c478bd9Sstevel@tonic-gate                -DLDAP_SASLIO_HOOKS
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate# Include directories for all files
747c478bd9Sstevel@tonic-gateCOM_INC=	-I$(SRC)/lib/libldap5/include/ldap \
757c478bd9Sstevel@tonic-gate		-I$(NSS_HDRS)
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gateSRCS=		$(BEROBJS:%.o=../sources/ldap/ber/%.c) \
787c478bd9Sstevel@tonic-gate		$(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
797c478bd9Sstevel@tonic-gate		$(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
807c478bd9Sstevel@tonic-gate		$(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
817c478bd9Sstevel@tonic-gate		$(UTILOBJS:%.o=../sources/ldap/util/%.c)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateLIBS =		$(DYNLIB) $(LINTLIB)
84f6acbf7cSrieDYNFLAGS +=	$(ZNODELETE)
857c478bd9Sstevel@tonic-gate
8645916cd2SjpkCPPFLAGS=	$(COM_INC) $(CPPFLAGS.master)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gate# definitions for lint
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate$(LINTLIB):= 	SRCS=../sources/ldap/common/llib-lldap
917c478bd9Sstevel@tonic-gate$(LINTLIB):= 	LINTFLAGS=-nvx
927c478bd9Sstevel@tonic-gate$(LINTLIB):= 	TARGET_ARCH=
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gateLINTOUT=	lint.out
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gateLINTSRC=	$(LINTLIB:%.ln=%)
977c478bd9Sstevel@tonic-gateROOTLINTDIR=	$(ROOTLIBDIR)
987c478bd9Sstevel@tonic-gateROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gateCLEANFILES += 	$(LINTOUT) $(LINTLIB)
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gate# Local Libldap definitions
1047c478bd9Sstevel@tonic-gateLOCFLAGS +=	 $(XSTRCONST) -D_REENTRANT
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate# Following values defined in Makefile.master are overwritten here.
1077c478bd9Sstevel@tonic-gate#sparc_C_PICFLAGS =	$(sparc_C_BIGPICFLAGS)
1087c478bd9Sstevel@tonic-gatesparcv9_C_PICFLAGS =	$(sparcv9_C_BIGPICFLAGS)
1097c478bd9Sstevel@tonic-gate#i386_C_PICFLAGS =	$(i386_C_BIGPICFLAGS)
1107c478bd9Sstevel@tonic-gate#amd64_C_PICFLAGS =	$(amd64_C_BIGPICFLAGS)
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gateCFLAGS +=	$(CCVERBOSE) $(LOCFLAGS)
1137c478bd9Sstevel@tonic-gateCFLAGS64 +=	$(LOCFLAGS)
1147014882cSRichard Lowe
1157014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
1167014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
1177014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-type-limits
1187014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
1197014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
1207014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-value
1217014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-address
1227014882cSRichard Lowe
123734b6a94SdarrenmLDLIBS +=	-lsasl -lsocket -lnsl -lmd -lc
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gate.KEEP_STATE:
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate# include library targets
1287c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/ber/%.c
1317c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
1327c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/common/%.c
1357c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
1367c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/ssldap/%.c
1397c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
1407c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1417c478bd9Sstevel@tonic-gate
1427c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/prldap/%.c
1437c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
1447c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1457c478bd9Sstevel@tonic-gate
1467c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/util/%.c
1477c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
1487c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1497c478bd9Sstevel@tonic-gate
1507c478bd9Sstevel@tonic-gate# install rule for lint library target
1517c478bd9Sstevel@tonic-gate$(ROOTLINTDIR)/%: ../sources/ldap/common/%
1527c478bd9Sstevel@tonic-gate	$(INS.file)
153