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


   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 #
  23 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.

  24 #
  25 
  26 MYPROG =        svccfg
  27 PROG =          $(MYPROG)
  28 
  29 SRCS  =         svccfg_main.c \
  30                 svccfg_engine.c \
  31                 svccfg_internal.c \
  32                 svccfg_libscf.c \
  33                 svccfg_tmpl.c \
  34                 svccfg_xml.c \
  35                 svccfg_help.c
  36 
  37 LNTS =          $(SRCS:%.c=%.ln) \
  38                 manifest_find.ln \
  39                 manifest_hash.ln
  40 
  41 MYOBJS =        $(SRCS:%.c=%.o) \
  42                 svccfg_grammar.o \
  43                 svccfg_lex.o \


  72 MYCPPFLAGS =    -I ../common -I$(ADJUNCT_PROTO)/usr/include/libxml2
  73 CPPFLAGS +=     $(MYCPPFLAGS)
  74 LDFLAGS +=      $(MAPOPTS)
  75 
  76 CERRWARN +=     -_gcc=-Wno-unused-label
  77 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  78 CERRWARN +=     -_gcc=-Wno-switch
  79 CERRWARN +=     -_gcc=-Wno-uninitialized
  80 CERRWARN +=     -_gcc=-Wno-unused-variable
  81 CERRWARN +=     -_gcc=-Wno-parentheses
  82 
  83 LFLAGS = -t
  84 YFLAGS = -d
  85 
  86 CLOBBERFILES += svccfg_lex.c svccfg_grammar.c svccfg_grammar.h \
  87     $(MYPROG:%=%-native)
  88 
  89 SVCCFG_EXTRA_LIBS = -lxml2 -lscf -ll -luutil -lumem -lmd5 -lnvpair
  90 $(NOT_NATIVE)SVCCFG_EXTRA_LIBS += -ltecla
  91 



  92 LIBSCF          = $(SRC)/lib/libscf
  93 LIBTECLA        = $(SRC)/lib/libtecla           # just for the header
  94 LIBUUTIL        = $(SRC)/lib/libuutil
  95 
  96 debug := COPTFLAG = -g
  97 
  98 lint := LINTFLAGS = -mux
  99 lint := SVCCFG_EXTRA_LIBS = -lscf -ll -luutil -lumem -lmd5 -lnvpair
 100 
 101 LDLIBS += $(SVCCFG_EXTRA_LIBS)
 102 
 103 $(NATIVE_BUILD)CC =     $(NATIVECC)
 104 $(NATIVE_BUILD)LD =     $(NATIVELD)
 105 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
 106 $(NATIVE_BUILD)CPPFLAGS = \
 107         -DNATIVE_BUILD \
 108         $(MYCPPFLAGS) \
 109         -I$(LIBSCF)/inc \
 110         -I$(LIBTECLA) \
 111         -I$(LIBUUTIL)/common




   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 #
  23 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright 2017 RackTop Systems.
  25 #
  26 
  27 MYPROG =        svccfg
  28 PROG =          $(MYPROG)
  29 
  30 SRCS  =         svccfg_main.c \
  31                 svccfg_engine.c \
  32                 svccfg_internal.c \
  33                 svccfg_libscf.c \
  34                 svccfg_tmpl.c \
  35                 svccfg_xml.c \
  36                 svccfg_help.c
  37 
  38 LNTS =          $(SRCS:%.c=%.ln) \
  39                 manifest_find.ln \
  40                 manifest_hash.ln
  41 
  42 MYOBJS =        $(SRCS:%.c=%.o) \
  43                 svccfg_grammar.o \
  44                 svccfg_lex.o \


  73 MYCPPFLAGS =    -I ../common -I$(ADJUNCT_PROTO)/usr/include/libxml2
  74 CPPFLAGS +=     $(MYCPPFLAGS)
  75 LDFLAGS +=      $(MAPOPTS)
  76 
  77 CERRWARN +=     -_gcc=-Wno-unused-label
  78 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  79 CERRWARN +=     -_gcc=-Wno-switch
  80 CERRWARN +=     -_gcc=-Wno-uninitialized
  81 CERRWARN +=     -_gcc=-Wno-unused-variable
  82 CERRWARN +=     -_gcc=-Wno-parentheses
  83 
  84 LFLAGS = -t
  85 YFLAGS = -d
  86 
  87 CLOBBERFILES += svccfg_lex.c svccfg_grammar.c svccfg_grammar.h \
  88     $(MYPROG:%=%-native)
  89 
  90 SVCCFG_EXTRA_LIBS = -lxml2 -lscf -ll -luutil -lumem -lmd5 -lnvpair
  91 $(NOT_NATIVE)SVCCFG_EXTRA_LIBS += -ltecla
  92 
  93 # Allow libxml2 to be taken from outside the proto area.
  94 $(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libxml2.so
  95 
  96 LIBSCF          = $(SRC)/lib/libscf
  97 LIBTECLA        = $(SRC)/lib/libtecla           # just for the header
  98 LIBUUTIL        = $(SRC)/lib/libuutil
  99 
 100 debug := COPTFLAG = -g
 101 
 102 lint := LINTFLAGS = -mux
 103 lint := SVCCFG_EXTRA_LIBS = -lscf -ll -luutil -lumem -lmd5 -lnvpair
 104 
 105 LDLIBS += $(SVCCFG_EXTRA_LIBS)
 106 
 107 $(NATIVE_BUILD)CC =     $(NATIVECC)
 108 $(NATIVE_BUILD)LD =     $(NATIVELD)
 109 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
 110 $(NATIVE_BUILD)CPPFLAGS = \
 111         -DNATIVE_BUILD \
 112         $(MYCPPFLAGS) \
 113         -I$(LIBSCF)/inc \
 114         -I$(LIBTECLA) \
 115         -I$(LIBUUTIL)/common