Merge illumos-gate
[unleashed/lotheac.git] / usr / src / lib / libldap5 / Makefile.com
blob7292ff1f51c5a0d1930be2a87f28cadc1025e21b
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 2018, Joyent, Inc.
27 LIBRARY= libldap.a
28 VERS= .5
30 # Definition of all the objects macros
31 # The LDAP specific objects
33 BEROBJS=        bprint.o        decode.o        encode.o       io.o
35 LDAPOBJS=  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
46 SSLDAPOBJS=     clientinit.o ldapsinit.o errormap.o
48 PRLDAPOBJS=     ldappr-dns.o    ldappr-error.o  ldappr-public.o \
49                 ldappr-io.o     ldappr-threads.o
51 UTILOBJS= log.o line64.o
53 # Grouping it all together
54 OBJECTS=        $(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
55                 $(UTILOBJS)
57 # include library definitions
58 include ../../Makefile.lib
60 NSS_LIBS=       -lnspr4 -lplc4 -lnss3 -lssl3
61 NSS_HDRS=       $(ADJUNCT_PROTO)/usr/include/mps
62 NSS_LDPATH=     /usr/lib/mps
63 NSS_LDPATH64=   $(NSS_LDPATH)/64        
66 LDAP_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
74 # Include directories for all files
75 COM_INC=        -I$(SRC)/lib/libldap5/include/ldap \
76                 -I$(NSS_HDRS)
78 SRCS=           $(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)
84 LIBS =          $(DYNLIB)
85 DYNFLAGS +=     $(ZNODELETE)
87 CPPFLAGS=       $(COM_INC) $(CPPFLAGS.master)
89 # Local Libldap definitions
91 # Following values defined in Makefile.master are overwritten here.
92 #sparc_C_PICFLAGS =     $(sparc_C_BIGPICFLAGS)
93 sparcv9_C_PICFLAGS =    $(sparcv9_C_BIGPICFLAGS)
94 #i386_C_PICFLAGS =      $(i386_C_BIGPICFLAGS)
95 #amd64_C_PICFLAGS =     $(amd64_C_BIGPICFLAGS)
97 CFLAGS +=       $(LOCFLAGS)
98 CFLAGS64 +=     $(LOCFLAGS)
100 CERRWARN +=     -Wno-parentheses
101 CERRWARN +=     -Wno-uninitialized
102 CERRWARN +=     -Wno-type-limits
103 CERRWARN +=     -Wno-unused-function
104 CERRWARN +=     -Wno-unused-variable
105 CERRWARN +=     -Wno-unused-value
106 CERRWARN +=     -Wno-address
108 # not linted
109 SMATCH=off
111 LDLIBS +=       -lsasl -lmd -lc
113 .KEEP_STATE:
115 # include library targets
116 include ../../Makefile.targ
118 pics/%.o: ../sources/ldap/ber/%.c
119         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
120         $(POST_PROCESS_O)
122 pics/%.o: ../sources/ldap/common/%.c
123         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
124         $(POST_PROCESS_O)
126 pics/%.o: ../sources/ldap/ssldap/%.c
127         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
128         $(POST_PROCESS_O)
130 pics/%.o: ../sources/ldap/prldap/%.c
131         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
132         $(POST_PROCESS_O)
134 pics/%.o: ../sources/ldap/util/%.c
135         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
136         $(POST_PROCESS_O)