xref: /titanic_51/usr/src/lib/libldap5/Makefile.com (revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e)
17c478bd9Sstevel@tonic-gate#
2*45916cd2Sjpk# CDDL HEADER START
3*45916cd2Sjpk#
4*45916cd2Sjpk# The contents of this file are subject to the terms of the
5*45916cd2Sjpk# Common Development and Distribution License (the "License").
6*45916cd2Sjpk# You may not use this file except in compliance with the License.
7*45916cd2Sjpk#
8*45916cd2Sjpk# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*45916cd2Sjpk# or http://www.opensolaris.org/os/licensing.
10*45916cd2Sjpk# See the License for the specific language governing permissions
11*45916cd2Sjpk# and limitations under the License.
12*45916cd2Sjpk#
13*45916cd2Sjpk# When distributing Covered Code, include this CDDL HEADER in each
14*45916cd2Sjpk# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*45916cd2Sjpk# If applicable, add the following below this CDDL HEADER, with the
16*45916cd2Sjpk# fields enclosed by brackets "[]" replaced with your own identifying
17*45916cd2Sjpk# information: Portions Copyright [yyyy] [name of copyright owner]
18*45916cd2Sjpk#
19*45916cd2Sjpk# CDDL HEADER END
20*45916cd2Sjpk#
21*45916cd2Sjpk#
22*45916cd2Sjpk# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate# lib/libldap5/Makefile.com
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateLIBRARY= libldap.a
327c478bd9Sstevel@tonic-gateVERS= .5
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gate# Definition of all the objects macros
357c478bd9Sstevel@tonic-gate# The LDAP specific objects
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gateBEROBJS=	bprint.o	decode.o 	encode.o       io.o
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateLDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
407c478bd9Sstevel@tonic-gate        charset.o compare.o compat.o control.o countvalues.o \
417c478bd9Sstevel@tonic-gate        delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
427c478bd9Sstevel@tonic-gate        friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
437c478bd9Sstevel@tonic-gate        getfilter.o getoption.o getvalues.o memcache.o message.o \
447c478bd9Sstevel@tonic-gate        modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
457c478bd9Sstevel@tonic-gate        rename.o request.o reslist.o result.o saslbind.o sasl.o \
467c478bd9Sstevel@tonic-gate        sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
477c478bd9Sstevel@tonic-gate        tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
487c478bd9Sstevel@tonic-gate        cram_md5.o secutil.o spagectrl.o digest_md5.o
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateSSLDAPOBJS=	clientinit.o ldapsinit.o errormap.o
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gatePRLDAPOBJS=	ldappr-dns.o	ldappr-error.o	ldappr-public.o \
537c478bd9Sstevel@tonic-gate		ldappr-io.o	ldappr-threads.o
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateUTILOBJS= log.o line64.o
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gate# Grouping it all together
587c478bd9Sstevel@tonic-gateOBJECTS=	$(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
597c478bd9Sstevel@tonic-gate		$(UTILOBJS)
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gate# include library definitions
627c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gateNSS_LIBS=	-lnspr4 -lplc4 -lnss3 -lssl3
657c478bd9Sstevel@tonic-gateNSS_HDRS=	/usr/include/mps
667c478bd9Sstevel@tonic-gateNSS_LDPATH=	/usr/lib/mps
677c478bd9Sstevel@tonic-gateNSS_LDPATH64=	$(NSS_LDPATH)/64
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateLDAP_FLAGS=     -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
717c478bd9Sstevel@tonic-gate                -D_SOLARIS_SDK \
727c478bd9Sstevel@tonic-gate                -DUSE_WAITPID -DNEEDPROTOS \
737c478bd9Sstevel@tonic-gate                -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
747c478bd9Sstevel@tonic-gate                -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
757c478bd9Sstevel@tonic-gate                -DLDAP_SASLIO_HOOKS
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gate# Include directories for all files
797c478bd9Sstevel@tonic-gateCOM_INC=	-I$(SRC)/lib/libldap5/include/ldap \
807c478bd9Sstevel@tonic-gate		-I$(NSS_HDRS)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateSRCS=		$(BEROBJS:%.o=../sources/ldap/ber/%.c) \
837c478bd9Sstevel@tonic-gate		$(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
847c478bd9Sstevel@tonic-gate		$(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
857c478bd9Sstevel@tonic-gate		$(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
867c478bd9Sstevel@tonic-gate		$(UTILOBJS:%.o=../sources/ldap/util/%.c)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gateLIBS =		$(DYNLIB) $(LINTLIB)
897c478bd9Sstevel@tonic-gateDYNFLAGS +=	$(ZNODELETE)
907c478bd9Sstevel@tonic-gate
91*45916cd2SjpkCPPFLAGS=	$(COM_INC) $(CPPFLAGS.master)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate# definitions for lint
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate$(LINTLIB):= 	SRCS=../sources/ldap/common/llib-lldap
967c478bd9Sstevel@tonic-gate$(LINTLIB):= 	LINTFLAGS=-nvx
977c478bd9Sstevel@tonic-gate$(LINTLIB):= 	TARGET_ARCH=
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateLINTOUT=	lint.out
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gateLINTSRC=	$(LINTLIB:%.ln=%)
1027c478bd9Sstevel@tonic-gateROOTLINTDIR=	$(ROOTLIBDIR)
1037c478bd9Sstevel@tonic-gateROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gateCLEANFILES += 	$(LINTOUT) $(LINTLIB)
1077c478bd9Sstevel@tonic-gateCLOBBERFILES +=	$(MAPFILE)
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate# Local Libldap definitions
1107c478bd9Sstevel@tonic-gateLOCFLAGS +=	 $(XSTRCONST) -D_REENTRANT
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gate# Following values defined in Makefile.master are overwritten here.
1137c478bd9Sstevel@tonic-gate#sparc_C_PICFLAGS =	$(sparc_C_BIGPICFLAGS)
1147c478bd9Sstevel@tonic-gatesparcv9_C_PICFLAGS =	$(sparcv9_C_BIGPICFLAGS)
1157c478bd9Sstevel@tonic-gate#i386_C_PICFLAGS =	$(i386_C_BIGPICFLAGS)
1167c478bd9Sstevel@tonic-gate#amd64_C_PICFLAGS =	$(amd64_C_BIGPICFLAGS)
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gateMAPDIR = 	../spec/$(TRANSMACH)
1197c478bd9Sstevel@tonic-gateSPECMAPFILE =	$(MAPDIR)/mapfile
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateCFLAGS +=	$(CCVERBOSE) $(LOCFLAGS)
1227c478bd9Sstevel@tonic-gateCFLAGS64 +=	$(LOCFLAGS)
1237c478bd9Sstevel@tonic-gateLDLIBS +=	-lsasl -lsocket -lnsl -lmd5 -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