Print this page
12311 adjust NATIVE_LIBS in SMF makefiles


   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 (c) 2018, Joyent, Inc.
  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 \


  75 LDFLAGS +=      $(MAPOPTS)
  76 
  77 CERRWARN +=     -_gcc=-Wno-unused-label
  78 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  79 CERRWARN +=     -_gcc=-Wno-switch
  80 CERRWARN +=     $(CNOWARN_UNINIT)
  81 CERRWARN +=     -_gcc=-Wno-unused-variable
  82 CERRWARN +=     -_gcc=-Wno-parentheses
  83 
  84 # not linted
  85 SMATCH=off
  86 
  87 LFLAGS = -t
  88 YFLAGS = -d
  89 
  90 CLOBBERFILES += svccfg_lex.c svccfg_grammar.c svccfg_grammar.h \
  91     $(MYPROG:%=%-native)
  92 
  93 SVCCFG_EXTRA_LIBS = -lxml2 -lscf -ll -luutil -lumem -lmd5 -lnvpair
  94 $(NOT_NATIVE)SVCCFG_EXTRA_LIBS += -ltecla
  95 NATIVE_LIBS += libxml2.so




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




   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 2020 Joyent, Inc.
  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 \


  75 LDFLAGS +=      $(MAPOPTS)
  76 
  77 CERRWARN +=     -_gcc=-Wno-unused-label
  78 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  79 CERRWARN +=     -_gcc=-Wno-switch
  80 CERRWARN +=     $(CNOWARN_UNINIT)
  81 CERRWARN +=     -_gcc=-Wno-unused-variable
  82 CERRWARN +=     -_gcc=-Wno-parentheses
  83 
  84 # not linted
  85 SMATCH=off
  86 
  87 LFLAGS = -t
  88 YFLAGS = -d
  89 
  90 CLOBBERFILES += svccfg_lex.c svccfg_grammar.c svccfg_grammar.h \
  91     $(MYPROG:%=%-native)
  92 
  93 SVCCFG_EXTRA_LIBS = -lxml2 -lscf -ll -luutil -lumem -lmd5 -lnvpair
  94 $(NOT_NATIVE)SVCCFG_EXTRA_LIBS += -ltecla
  95 #
  96 # If no adjunct, then we'll already find /usr/lib via LDLIBS below.
  97 #
  98 $(NO_ADJUNCT_PROTO)NATIVE_LIBS += libxml2.so libl.so libumem.so \
  99     libmd5.so libnvpair.so libc.so
 100 
 101 LIBSCF          = $(SRC)/lib/libscf
 102 LIBTECLA        = $(SRC)/lib/libtecla           # just for the header
 103 LIBUUTIL        = $(SRC)/lib/libuutil
 104 
 105 lint := LINTFLAGS = -mux
 106 lint := SVCCFG_EXTRA_LIBS = -lscf -ll -luutil -lumem -lmd5 -lnvpair
 107 
 108 LDLIBS += $(SVCCFG_EXTRA_LIBS)
 109 
 110 $(NATIVE_BUILD)CC =     $(NATIVECC)
 111 $(NATIVE_BUILD)LD =     $(NATIVELD)
 112 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
 113 $(NATIVE_BUILD)CPPFLAGS = \
 114         -DNATIVE_BUILD \
 115         $(MYCPPFLAGS) \
 116         -I$(LIBSCF)/inc \
 117         -I$(LIBTECLA) \
 118         -I$(LIBUUTIL)/common
 119 $(NATIVE_BUILD)LDFLAGS = $(BDIRECT)