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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 #
  24 # Copyright (c) 2012 by Delphix. All rights reserved.

  25 #
  26 
  27 LIBRARY =       libwanboot.a
  28 VERS =          .1
  29 
  30 # List of locally located modules.
  31 LOC_DIR =       ../common
  32 LOC_OBJS =      socket_inet.o bootinfo_aux.o
  33 LOC_SRCS =      $(LOC_OBJS:%.o=$(LOC_DIR)/%.c)
  34 
  35 # List of common wanboot objects.
  36 COM_DIR =       ../../../common/net/wanboot
  37 COM_OBJS =      auxutil.o \
  38                 boot_http.o \
  39                 bootconf.o \
  40                 bootconf_errmsg.o \
  41                 bootinfo.o \
  42                 bootlog.o \
  43                 http_errorstr.o \
  44                 p12access.o \
  45                 p12auxpars.o \
  46                 p12auxutl.o \
  47                 p12err.o \
  48                 p12misc.o \
  49                 parseURL.o
  50 COM_SRCS =      $(COM_OBJS:%.o=$(COM_DIR)/%.c)
  51 
  52 # List of common DHCP modules.
  53 DHCP_DIR =      $(SRC)/common/net/dhcp
  54 DHCP_OBJS =     dhcpinfo.o
  55 DHCP_SRCS =     $(DHCP_OBJS:%.o=$(DHCP_DIR)/%.c)
  56 
  57 OBJECTS =       $(LOC_OBJS) $(COM_OBJS) $(DHCP_OBJS)
  58 
  59 include ../../Makefile.lib
  60 
  61 LIBS +=         $(LINTLIB)
  62 LDLIBS +=       -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \
  63                 -linetutil -lc -lcrypto -lssl





  64 CPPFLAGS =      -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master)
  65 CERRWARN +=     -_gcc=-Wno-switch
  66 CERRWARN +=     -_gcc=-Wno-parentheses
  67 CERRWARN +=     -_gcc=-Wno-unused-value
  68 CERRWARN +=     -_gcc=-Wno-uninitialized
  69 
  70 # Must override SRCS from Makefile.lib since sources have
  71 # multiple source directories.
  72 SRCS =          $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS)
  73 
  74 # Must define location of lint library source.
  75 SRCDIR =        $(LOC_DIR)
  76 $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
  77 
  78 # OpenSSL (incl. varying versions) requires us to turn these off
  79 LINTFLAGS   +=    -erroff=E_BAD_PTR_CAST_ALIGN,E_SUPPRESSION_DIRECTIVE_UNUSED
  80 LINTFLAGS64 +=    -erroff=E_BAD_PTR_CAST_ALIGN,E_SUPPRESSION_DIRECTIVE_UNUSED
  81 
  82 CFLAGS +=       $(CCVERBOSE)
  83 CPPFLAGS +=     -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR)


   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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 #
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2017 RackTop Systems.
  26 #
  27 
  28 LIBRARY =       libwanboot.a
  29 VERS =          .1
  30 
  31 # List of locally located modules.
  32 LOC_DIR =       ../common
  33 LOC_OBJS =      socket_inet.o bootinfo_aux.o
  34 LOC_SRCS =      $(LOC_OBJS:%.o=$(LOC_DIR)/%.c)
  35 
  36 # List of common wanboot objects.
  37 COM_DIR =       ../../../common/net/wanboot
  38 COM_OBJS =      auxutil.o \
  39                 boot_http.o \
  40                 bootconf.o \
  41                 bootconf_errmsg.o \
  42                 bootinfo.o \
  43                 bootlog.o \
  44                 http_errorstr.o \
  45                 p12access.o \
  46                 p12auxpars.o \
  47                 p12auxutl.o \
  48                 p12err.o \
  49                 p12misc.o \
  50                 parseURL.o
  51 COM_SRCS =      $(COM_OBJS:%.o=$(COM_DIR)/%.c)
  52 
  53 # List of common DHCP modules.
  54 DHCP_DIR =      $(SRC)/common/net/dhcp
  55 DHCP_OBJS =     dhcpinfo.o
  56 DHCP_SRCS =     $(DHCP_OBJS:%.o=$(DHCP_DIR)/%.c)
  57 
  58 OBJECTS =       $(LOC_OBJS) $(COM_OBJS) $(DHCP_OBJS)
  59 
  60 include ../../Makefile.lib
  61 
  62 LIBS +=         $(LINTLIB)
  63 LDLIBS +=       -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \
  64                 -linetutil -lc -lcrypto -lssl
  65 
  66 # Allow libcrypto and libssl to be taken from outside the proto area.
  67 $(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libcrypto.so
  68 $(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libssl.so
  69 
  70 CPPFLAGS =      -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master)
  71 CERRWARN +=     -_gcc=-Wno-switch
  72 CERRWARN +=     -_gcc=-Wno-parentheses
  73 CERRWARN +=     -_gcc=-Wno-unused-value
  74 CERRWARN +=     -_gcc=-Wno-uninitialized
  75 
  76 # Must override SRCS from Makefile.lib since sources have
  77 # multiple source directories.
  78 SRCS =          $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS)
  79 
  80 # Must define location of lint library source.
  81 SRCDIR =        $(LOC_DIR)
  82 $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
  83 
  84 # OpenSSL (incl. varying versions) requires us to turn these off
  85 LINTFLAGS   +=    -erroff=E_BAD_PTR_CAST_ALIGN,E_SUPPRESSION_DIRECTIVE_UNUSED
  86 LINTFLAGS64 +=    -erroff=E_BAD_PTR_CAST_ALIGN,E_SUPPRESSION_DIRECTIVE_UNUSED
  87 
  88 CFLAGS +=       $(CCVERBOSE)
  89 CPPFLAGS +=     -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR)