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 27 LIBRARY= libldap.a 28 VERS= .5 29 30 # Definition of all the objects macros 31 # The LDAP specific objects 32 33 BEROBJS= bprint.o decode.o encode.o io.o 34 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 45 46 SSLDAPOBJS= clientinit.o ldapsinit.o errormap.o 47 48 PRLDAPOBJS= ldappr-dns.o ldappr-error.o ldappr-public.o \ 49 ldappr-io.o ldappr-threads.o 50 51 UTILOBJS= log.o line64.o 52 53 # Grouping it all together 54 OBJECTS= $(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \ 55 $(UTILOBJS) 56 57 # include library definitions 58 include ../../Makefile.lib 59 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 64 65 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 72 73 74 # Include directories for all files 75 COM_INC= -I$(SRC)/lib/libldap5/include/ldap \ 76 -I$(NSS_HDRS) 77 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) 83 84 LIBS = $(DYNLIB) $(LINTLIB) 85 DYNFLAGS += $(ZNODELETE) 86 87 CPPFLAGS= $(COM_INC) $(CPPFLAGS.master) 88 89 # definitions for lint 90 91 $(LINTLIB):= SRCS=../sources/ldap/common/llib-lldap 92 $(LINTLIB):= LINTFLAGS=-nvx 93 $(LINTLIB):= TARGET_ARCH= 94 95 LINTOUT= lint.out 96 97 LINTSRC= $(LINTLIB:%.ln=%) 98 ROOTLINTDIR= $(ROOTLIBDIR) 99 ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%) 100 101 102 CLEANFILES += $(LINTOUT) $(LINTLIB) 103 104 # Local Libldap definitions 105 LOCFLAGS += $(XSTRCONST) -D_REENTRANT 106 107 # Following values defined in Makefile.master are overwritten here. 108 #sparc_C_PICFLAGS = $(sparc_C_BIGPICFLAGS) 109 sparcv9_C_PICFLAGS = $(sparcv9_C_BIGPICFLAGS) 110 #i386_C_PICFLAGS = $(i386_C_BIGPICFLAGS) 111 #amd64_C_PICFLAGS = $(amd64_C_BIGPICFLAGS) 112 113 CFLAGS += $(CCVERBOSE) $(LOCFLAGS) 114 CFLAGS64 += $(LOCFLAGS) 115 116 CERRWARN += -_gcc=-Wno-parentheses 117 CERRWARN += -_gcc=-Wno-uninitialized 118 CERRWARN += -_gcc=-Wno-type-limits 119 CERRWARN += -_gcc=-Wno-unused-function 120 CERRWARN += -_gcc=-Wno-unused-variable 121 CERRWARN += -_gcc=-Wno-unused-value 122 CERRWARN += -_gcc=-Wno-address 123 124 # not linted 125 SMATCH=off 126 127 LDLIBS += -lsasl -lsocket -lnsl -lmd -lc 128 129 .KEEP_STATE: 130 131 # include library targets 132 include ../../Makefile.targ 133 134 pics/%.o: ../sources/ldap/ber/%.c 135 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $< 136 $(POST_PROCESS_O) 137 138 pics/%.o: ../sources/ldap/common/%.c 139 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $< 140 $(POST_PROCESS_O) 141 142 pics/%.o: ../sources/ldap/ssldap/%.c 143 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $< 144 $(POST_PROCESS_O) 145 146 pics/%.o: ../sources/ldap/prldap/%.c 147 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $< 148 $(POST_PROCESS_O) 149 150 pics/%.o: ../sources/ldap/util/%.c 151 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $< 152 $(POST_PROCESS_O) 153 154 # install rule for lint library target 155 $(ROOTLINTDIR)/%: ../sources/ldap/common/% 156 $(INS.file)