Print this page
8411 Build should warn when linking against libraries outside proto area


   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 
  26 LIBRARY= libldap.a
  27 VERS= .5
  28 
  29 # Definition of all the objects macros
  30 # The LDAP specific objects
  31 
  32 BEROBJS=        bprint.o        decode.o        encode.o       io.o
  33 
  34 LDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
  35         charset.o compare.o compat.o control.o countvalues.o \
  36         delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
  37         friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
  38         getfilter.o getoption.o getvalues.o memcache.o message.o \
  39         modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
  40         rename.o request.o reslist.o result.o saslbind.o sasl.o \
  41         sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
  42         tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
  43         cram_md5.o secutil.o spagectrl.o digest_md5.o
  44 


  66                 -D_SOLARIS_SDK \
  67                 -DUSE_WAITPID -DNEEDPROTOS \
  68                 -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
  69                 -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
  70                 -DLDAP_SASLIO_HOOKS
  71 
  72 
  73 # Include directories for all files
  74 COM_INC=        -I$(SRC)/lib/libldap5/include/ldap \
  75                 -I$(NSS_HDRS)
  76 
  77 SRCS=           $(BEROBJS:%.o=../sources/ldap/ber/%.c) \
  78                 $(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
  79                 $(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
  80                 $(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
  81                 $(UTILOBJS:%.o=../sources/ldap/util/%.c)
  82 
  83 LIBS =          $(DYNLIB) $(LINTLIB)
  84 DYNFLAGS +=     $(ZNODELETE)
  85 



  86 CPPFLAGS=       $(COM_INC) $(CPPFLAGS.master)
  87 
  88 # definitions for lint
  89 
  90 $(LINTLIB):=    SRCS=../sources/ldap/common/llib-lldap
  91 $(LINTLIB):=    LINTFLAGS=-nvx 
  92 $(LINTLIB):=    TARGET_ARCH=
  93 
  94 LINTOUT=        lint.out
  95 
  96 LINTSRC=        $(LINTLIB:%.ln=%)
  97 ROOTLINTDIR=    $(ROOTLIBDIR)
  98 ROOTLINT=       $(LINTSRC:%=$(ROOTLINTDIR)/%)
  99 
 100 
 101 CLEANFILES +=   $(LINTOUT) $(LINTLIB)
 102 
 103 # Local Libldap definitions
 104 LOCFLAGS +=      $(XSTRCONST) -D_REENTRANT
 105 
 106 # Following values defined in Makefile.master are overwritten here.
 107 #sparc_C_PICFLAGS =     $(sparc_C_BIGPICFLAGS)
 108 sparcv9_C_PICFLAGS =    $(sparcv9_C_BIGPICFLAGS)
 109 #i386_C_PICFLAGS =      $(i386_C_BIGPICFLAGS)
 110 #amd64_C_PICFLAGS =     $(amd64_C_BIGPICFLAGS)
 111 
 112 CFLAGS +=       $(CCVERBOSE) $(LOCFLAGS)
 113 CFLAGS64 +=     $(LOCFLAGS)
 114 
 115 CERRWARN +=     -_gcc=-Wno-parentheses
 116 CERRWARN +=     -_gcc=-Wno-uninitialized
 117 CERRWARN +=     -_gcc=-Wno-type-limits
 118 CERRWARN +=     -_gcc=-Wno-unused-function
 119 CERRWARN +=     -_gcc=-Wno-unused-variable
 120 CERRWARN +=     -_gcc=-Wno-unused-value
 121 CERRWARN +=     -_gcc=-Wno-address
 122 
 123 LDLIBS +=       -lsasl -lsocket -lnsl -lmd -lc



 124 







 125 .KEEP_STATE:
 126 
 127 # include library targets
 128 include ../../Makefile.targ
 129 
 130 pics/%.o: ../sources/ldap/ber/%.c
 131         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
 132         $(POST_PROCESS_O)
 133 
 134 pics/%.o: ../sources/ldap/common/%.c
 135         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
 136         $(POST_PROCESS_O)
 137 
 138 pics/%.o: ../sources/ldap/ssldap/%.c
 139         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
 140         $(POST_PROCESS_O)
 141 
 142 pics/%.o: ../sources/ldap/prldap/%.c
 143         $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
 144         $(POST_PROCESS_O)


   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 


  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)