xref: /illumos-gate/usr/src/lib/libldap5/Makefile.com (revision d17be682a2c70b4505d43c830bbd2603da11918d)
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#
2505ede3dbSJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateLIBRARY= libldap.a
287c478bd9Sstevel@tonic-gateVERS= .5
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate# Definition of all the objects macros
317c478bd9Sstevel@tonic-gate# The LDAP specific objects
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateBEROBJS=	bprint.o	decode.o	encode.o       io.o
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateLDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
367c478bd9Sstevel@tonic-gate        charset.o compare.o compat.o control.o countvalues.o \
377c478bd9Sstevel@tonic-gate        delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
387c478bd9Sstevel@tonic-gate        friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
397c478bd9Sstevel@tonic-gate        getfilter.o getoption.o getvalues.o memcache.o message.o \
407c478bd9Sstevel@tonic-gate        modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
417c478bd9Sstevel@tonic-gate        rename.o request.o reslist.o result.o saslbind.o sasl.o \
427c478bd9Sstevel@tonic-gate        sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
437c478bd9Sstevel@tonic-gate        tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
447c478bd9Sstevel@tonic-gate        cram_md5.o secutil.o spagectrl.o digest_md5.o
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gateSSLDAPOBJS=	clientinit.o ldapsinit.o errormap.o
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gatePRLDAPOBJS=	ldappr-dns.o	ldappr-error.o	ldappr-public.o \
497c478bd9Sstevel@tonic-gate		ldappr-io.o	ldappr-threads.o
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gateUTILOBJS= log.o line64.o
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gate# Grouping it all together
547c478bd9Sstevel@tonic-gateOBJECTS=	$(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
557c478bd9Sstevel@tonic-gate		$(UTILOBJS)
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gate# include library definitions
587c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gateNSS_LIBS=	-lnspr4 -lplc4 -lnss3 -lssl3
61494f7e12SKeith M WesolowskiNSS_HDRS=	$(ADJUNCT_PROTO)/usr/include/mps
627c478bd9Sstevel@tonic-gateNSS_LDPATH=	/usr/lib/mps
637c478bd9Sstevel@tonic-gateNSS_LDPATH64=	$(NSS_LDPATH)/64
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateLDAP_FLAGS=     -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
677c478bd9Sstevel@tonic-gate                -D_SOLARIS_SDK \
687c478bd9Sstevel@tonic-gate                -DUSE_WAITPID -DNEEDPROTOS \
697c478bd9Sstevel@tonic-gate                -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
707c478bd9Sstevel@tonic-gate                -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
717c478bd9Sstevel@tonic-gate                -DLDAP_SASLIO_HOOKS
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gate# Include directories for all files
757c478bd9Sstevel@tonic-gateCOM_INC=	-I$(SRC)/lib/libldap5/include/ldap \
767c478bd9Sstevel@tonic-gate		-I$(NSS_HDRS)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateSRCS=		$(BEROBJS:%.o=../sources/ldap/ber/%.c) \
797c478bd9Sstevel@tonic-gate		$(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
807c478bd9Sstevel@tonic-gate		$(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
817c478bd9Sstevel@tonic-gate		$(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
827c478bd9Sstevel@tonic-gate		$(UTILOBJS:%.o=../sources/ldap/util/%.c)
837c478bd9Sstevel@tonic-gate
84241c90a0SRichard LoweLIBS =		$(DYNLIB)
85f6acbf7cSrieDYNFLAGS +=	$(ZNODELETE)
867c478bd9Sstevel@tonic-gate
8745916cd2SjpkCPPFLAGS=	$(COM_INC) $(CPPFLAGS.master)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate# Local Libldap definitions
90*d17be682SRichard LoweLOCFLAGS +=	 -D_REENTRANT
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate# Following values defined in Makefile.master are overwritten here.
937c478bd9Sstevel@tonic-gate#sparc_C_PICFLAGS =	$(sparc_C_BIGPICFLAGS)
947c478bd9Sstevel@tonic-gatesparcv9_C_PICFLAGS =	$(sparcv9_C_BIGPICFLAGS)
957c478bd9Sstevel@tonic-gate#i386_C_PICFLAGS =	$(i386_C_BIGPICFLAGS)
967c478bd9Sstevel@tonic-gate#amd64_C_PICFLAGS =	$(amd64_C_BIGPICFLAGS)
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gateCFLAGS +=	$(CCVERBOSE) $(LOCFLAGS)
997c478bd9Sstevel@tonic-gateCFLAGS64 +=	$(LOCFLAGS)
1007014882cSRichard Lowe
1017014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
102d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
1037014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-type-limits
1047014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
1057014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
1067014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-value
1077014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-address
1087014882cSRichard Lowe
10905ede3dbSJohn Levon# not linted
11005ede3dbSJohn LevonSMATCH=off
11105ede3dbSJohn Levon
112734b6a94SdarrenmLDLIBS +=	-lsasl -lsocket -lnsl -lmd -lc
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gate.KEEP_STATE:
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gate# include library targets
1177c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/ber/%.c
1207c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
1217c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/common/%.c
1247c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
1257c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/ssldap/%.c
1287c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
1297c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1307c478bd9Sstevel@tonic-gate
1317c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/prldap/%.c
1327c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
1337c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gatepics/%.o: ../sources/ldap/util/%.c
1367c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
1377c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
138