xref: /illumos-gate/usr/src/lib/libldap5/Makefile.com (revision 9b664393d4fdda96221e6ea9ea95790d3c15be70)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright (c) 2018, Joyent, Inc.
26
27LIBRARY= libldap.a
28VERS= .5
29
30# Definition of all the objects macros
31# The LDAP specific objects
32
33BEROBJS=	bprint.o	decode.o	encode.o       io.o
34
35LDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
36        charset.o compare.o compat.o control.o countvalues.o \
37        delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
38        friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
39        getfilter.o getoption.o getvalues.o memcache.o message.o \
40        modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
41        rename.o request.o reslist.o result.o saslbind.o sasl.o \
42        sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
43        tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
44        cram_md5.o secutil.o spagectrl.o digest_md5.o
45
46SSLDAPOBJS=	clientinit.o ldapsinit.o errormap.o
47
48PRLDAPOBJS=	ldappr-dns.o	ldappr-error.o	ldappr-public.o \
49		ldappr-io.o	ldappr-threads.o
50
51UTILOBJS= log.o line64.o
52
53# Grouping it all together
54OBJECTS=	$(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
55		$(UTILOBJS)
56
57# include library definitions
58include ../../Makefile.lib
59
60NSS_LIBS=	-lnspr4 -lplc4 -lnss3 -lssl3
61NSS_HDRS=	$(ADJUNCT_PROTO)/usr/include/mps
62NSS_LDPATH=	/usr/lib/mps
63NSS_LDPATH64=	$(NSS_LDPATH)/64
64
65
66LDAP_FLAGS=     -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
67                -D_SOLARIS_SDK \
68                -DUSE_WAITPID -DNEEDPROTOS \
69                -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
70                -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
71                -DLDAP_SASLIO_HOOKS
72
73
74# Include directories for all files
75COM_INC=	-I$(SRC)/lib/libldap5/include/ldap \
76		-I$(NSS_HDRS)
77
78SRCS=		$(BEROBJS:%.o=../sources/ldap/ber/%.c) \
79		$(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
80		$(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
81		$(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
82		$(UTILOBJS:%.o=../sources/ldap/util/%.c)
83
84LIBS =		$(DYNLIB)
85DYNFLAGS +=	$(ZNODELETE)
86
87CPPFLAGS=	$(COM_INC) $(CPPFLAGS.master)
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
98CFLAGS +=	$(CCVERBOSE) $(LOCFLAGS)
99CFLAGS64 +=	$(LOCFLAGS)
100
101CERRWARN +=	-_gcc=-Wno-parentheses
102CERRWARN +=	$(CNOWARN_UNINIT)
103CERRWARN +=	-_gcc=-Wno-type-limits
104CERRWARN +=	-_gcc=-Wno-unused-function
105CERRWARN +=	-_gcc=-Wno-unused-variable
106CERRWARN +=	-_gcc=-Wno-unused-value
107CERRWARN +=	-_gcc=-Wno-address
108
109# not linted
110SMATCH=off
111
112LDLIBS +=	-lsasl -lsocket -lnsl -lmd -lc
113
114.KEEP_STATE:
115
116# include library targets
117include ../../Makefile.targ
118
119pics/%.o: ../sources/ldap/ber/%.c
120	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
121	$(POST_PROCESS_O)
122
123pics/%.o: ../sources/ldap/common/%.c
124	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
125	$(POST_PROCESS_O)
126
127pics/%.o: ../sources/ldap/ssldap/%.c
128	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
129	$(POST_PROCESS_O)
130
131pics/%.o: ../sources/ldap/prldap/%.c
132	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
133	$(POST_PROCESS_O)
134
135pics/%.o: ../sources/ldap/util/%.c
136	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
137	$(POST_PROCESS_O)
138