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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libshare/Makefile.com
          +++ new/usr/src/lib/libshare/Makefile.com
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  22   22  # Copyright (c) 2016 by Delphix. All rights reserved.
       23 +# Copyright 2017 RackTop Systems.
  23   24  #
  24   25  LIBRARY =       libshare.a
  25   26  VERS =          .1
  26   27  NFSLIB_DIR =    $(SRC)/cmd/fs.d/nfs/lib
  27   28  
  28   29  LIBOBJS =       libshare.o libsharecore.o scfutil.o libshare_zfs.o \
  29   30                  plugin.o parser.o issubdir.o
  30   31  OTHOBJS =       sharetab.o nfs_sec.o
  31   32  OBJECTS =       $(LIBOBJS) $(OTHOBJS)
  32   33  
↓ open down ↓ 1 lines elided ↑ open up ↑
  34   35  SRCDIR =        ../common
  35   36  
  36   37  LIBSRCS =       $(LIBOBJS:%.o=$(SRCDIR)/%.c)
  37   38  # we don't want to lint the sharetab and nfs_sec files
  38   39  lintcheck := SRCS = $(LIBSRCS)
  39   40  
  40   41  LIBS =          $(DYNLIB) $(LINTLIB)
  41   42  LDLIBS +=       -lc -lnsl -lscf -lzfs -luuid -lxml2 -lnvpair
  42   43  $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
  43   44  
       45 +# Allow libxml2 to be taken from outside the proto area.
       46 +$(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libxml2.so
       47 +
  44   48  #add nfs/lib directory as part of the include path
  45   49  CFLAGS +=       $(CCVERBOSE)
  46   50  C99MODE +=      $(C99_ENABLE)
  47   51  CERRWARN +=     -_gcc=-Wno-parentheses
  48   52  CERRWARN +=     -_gcc=-Wno-uninitialized
  49   53  CERRWARN +=     -_gcc=-Wno-switch
  50   54  CPPFLAGS +=     -D_REENTRANT -I$(NFSLIB_DIR) \
  51   55                  -I$(ADJUNCT_PROTO)/usr/include/libxml2
  52   56  
  53   57  .KEEP_STATE:
  54   58  
  55   59  all: $(LIBS)
  56   60  
  57   61  lint: lintcheck
  58   62  
  59   63  pics/%.o:       $(NFSLIB_DIR)/%.c
  60   64          $(COMPILE.c) -o $@ $<
  61   65          $(POST_PROCESS_O)
  62   66  
  63   67  include ../../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX