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 2017 RackTop Systems. 26 # 27 28 LIBRARY= libldap.a 29 VERS= .5 30 31 # Definition of all the objects macros 32 # The LDAP specific objects 33 34 BEROBJS= bprint.o decode.o encode.o io.o 35 36 LDAPOBJS= abandon.o add.o bind.o cache.o charray.o \ 37 charset.o compare.o compat.o control.o countvalues.o \ 38 delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \ 39 friendly.o getattr.o getdn.o getdxbyname.o getentry.o \ 40 getfilter.o getoption.o getvalues.o memcache.o message.o \ 41 modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \ 42 rename.o request.o reslist.o result.o saslbind.o sasl.o \ 43 sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \ 44 tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \ 45 cram_md5.o secutil.o spagectrl.o digest_md5.o 46 47 SSLDAPOBJS= clientinit.o ldapsinit.o errormap.o 48 49 PRLDAPOBJS= ldappr-dns.o ldappr-error.o ldappr-public.o \ 50 ldappr-io.o ldappr-threads.o 51 52 UTILOBJS= log.o line64.o 53 54 # Grouping it all together 55 OBJECTS= $(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \ 56 $(UTILOBJS) 57 58 # include library definitions 59 include ../../Makefile.lib 60 61 NSS_LIBS= -lnspr4 -lplc4 -lnss3 -lssl3 62 NSS_HDRS= $(ADJUNCT_PROTO)/usr/include/mps 63 NSS_LDPATH= /usr/lib/mps 64 NSS_LDPATH64= $(NSS_LDPATH)/64 65 66 67 LDAP_FLAGS= -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \ 68 -D_SOLARIS_SDK \ 69 -DUSE_WAITPID -DNEEDPROTOS \ 70 -DNET_SSL -DNO_LIBLCACHE -DLDAP_REFERRALS \ 71 -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \ 72 -DLDAP_SASLIO_HOOKS 73 74 75 # Include directories for all files 76 COM_INC= -I$(SRC)/lib/libldap5/include/ldap \ 77 -I$(NSS_HDRS) 78 79 SRCS= $(BEROBJS:%.o=../sources/ldap/ber/%.c) \ 80 $(LDAPOBJS:%.o=../sources/ldap/common/%.c) \ 81 $(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \ 82 $(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \ 83 $(UTILOBJS:%.o=../sources/ldap/util/%.c) 84 85 LIBS = $(DYNLIB) $(LINTLIB) 86 DYNFLAGS += $(ZNODELETE) 87 88 # Allow the NSS libraries to be taken from outside the proto area. 89 $(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(NSS_LIBS:-l%=$(ZASSERTDEFLIB)=lib%.so) 90 91 CPPFLAGS= $(COM_INC) $(CPPFLAGS.master) 92 93 # definitions for lint 94 95 $(LINTLIB):= SRCS=../sources/ldap/common/llib-lldap 96 $(LINTLIB):= LINTFLAGS=-nvx 97 $(LINTLIB):= TARGET_ARCH= 98 99 LINTOUT= lint.out 100 101 LINTSRC= $(LINTLIB:%.ln=%) 102 ROOTLINTDIR= $(ROOTLIBDIR) 103 ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%) 104 105 106 CLEANFILES += $(LINTOUT) $(LINTLIB) 107 108 # Local Libldap definitions 109 LOCFLAGS += $(XSTRCONST) -D_REENTRANT 110 111 # Following values defined in Makefile.master are overwritten here. 112 #sparc_C_PICFLAGS = $(sparc_C_BIGPICFLAGS) 113 sparcv9_C_PICFLAGS = $(sparcv9_C_BIGPICFLAGS) 114 #i386_C_PICFLAGS = $(i386_C_BIGPICFLAGS) 115 #amd64_C_PICFLAGS = $(amd64_C_BIGPICFLAGS) 116 117 CFLAGS += $(CCVERBOSE) $(LOCFLAGS) 118 CFLAGS64 += $(LOCFLAGS) 119 120 CERRWARN += -_gcc=-Wno-parentheses 121 CERRWARN += -_gcc=-Wno-uninitialized 122 CERRWARN += -_gcc=-Wno-type-limits 123 CERRWARN += -_gcc=-Wno-unused-function 124 CERRWARN += -_gcc=-Wno-unused-variable 125 CERRWARN += -_gcc=-Wno-unused-value 126 CERRWARN += -_gcc=-Wno-address 127 128 # Override the default linker path so that libraries found in the host 129 # directories will trigger the -zassert-deflib logic. 130 LDLIBS32 += -YP,$(DEFLDPATH):$(NSS_LDPATH) 131 LDLIBS64 += -YP,$(DEFLDPATH64):$(NSS_LDPATH64) 132 133 # Only add -L options for the NSS directories if ADJUNCT_PROTO is being 134 # used because it disables the -zassert-deflib logic. 135 $(ADJUNCT_PROTO_SET)LDLIBS32 += -L$(NSS_LDPATH) 136 $(ADJUNCT_PROTO_SET)LDLIBS64 += -L$(NSS_LDPATH64) 137 138 LDLIBS += -lsasl -lsocket -lnsl -lmd -lc $(NSS_LIBS) 139 140 .KEEP_STATE: 141 142 # include library targets 143 include ../../Makefile.targ 144 145 pics/%.o: ../sources/ldap/ber/%.c 146 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $< 147 $(POST_PROCESS_O) 148 149 pics/%.o: ../sources/ldap/common/%.c 150 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $< 151 $(POST_PROCESS_O) 152 153 pics/%.o: ../sources/ldap/ssldap/%.c 154 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $< 155 $(POST_PROCESS_O) 156 157 pics/%.o: ../sources/ldap/prldap/%.c 158 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $< 159 $(POST_PROCESS_O) 160 161 pics/%.o: ../sources/ldap/util/%.c 162 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $< 163 $(POST_PROCESS_O) 164 165 # install rule for lint library target 166 $(ROOTLINTDIR)/%: ../sources/ldap/common/% 167 $(INS.file)