Print this page
    
NEX-5200 native tools must reliably use a native adjunct
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
NEX-4081 Upstream changes from illumos 5916 make libsqlite a real shared lib
Reviewed by: Alex Eremin <a.eremin@nexenta.com>
re #13879 make libsqlite a real shared lib
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/cmd/svc/configd/Makefile
          +++ new/usr/src/cmd/svc/configd/Makefile
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  12   12  #
  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  #
  22   22  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
  25   25  # Copyright 2015 RackTop Systems.
  26   26  #
  27   27  
  28   28  MYPROG = svc.configd
  29   29  MYOBJS = \
  30   30          backend.o \
  31   31          configd.o \
  32   32          client.o \
  33   33          file_object.o \
  34   34          maindoor.o \
  35   35          object.o \
  36   36          rc_node.o \
  37   37          snapshot.o
  38   38  
  39   39  PROG = $(MYPROG)
  40   40  OBJS = $(MYOBJS)
  41   41  
  42   42  SRCS = $(MYOBJS:%.o=%.c)
  43   43  
  44   44  include ../../Makefile.cmd
  45   45  include ../../Makefile.ctf
  46   46  
  47   47  NATIVE_BUILD=$(POUND_SIGN)
  48   48  $(NATIVE_BUILD)PROG = $(MYPROG:%=%-native)
  49   49  $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
  50   50  
  51   51  ROOTCMDDIR=     $(ROOT)/lib/svc/bin
  52   52  
  53   53  MYCPPFLAGS = -I. -I../common -I../../../common/svc \
  54   54          -I$(ROOT)/usr/include/sqlite-sys -D_REENTRANT
  55   55  CPPFLAGS += $(MYCPPFLAGS)
  56   56  CFLAGS  += $(CCVERBOSE)
  57   57  CERRWARN += -_gcc=-Wno-parentheses
  58   58  CERRWARN += -_gcc=-Wno-type-limits
  59   59  CERRWARN += -_gcc=-Wno-unused-label
  60   60  CERRWARN += -_gcc=-Wno-unused-variable
  61   61  CERRWARN += -_gcc=-Wno-unused-function
  62   62  CERRWARN += -_gcc=-Wno-uninitialized
  63   63  MYLDLIBS = -lumem -luutil
  64   64  LDLIBS  += -lsecdb -lbsm $(MYLDLIBS)
  65   65  LINTFLAGS += -errtags -erroff=E_BAD_FORMAT_ARG_TYPE2 -erroff=E_NAME_DEF_NOT_USED2
  66   66  
  67   67  CLOBBERFILES += $(MYPROG:%=%-native)
  68   68  
  69   69  LIBUUTIL        = $(SRC)/lib/libuutil
  70   70  LIBSCF          = $(SRC)/lib/libscf
  71   71  
  72   72  SCRIPTFILE      = restore_repository
  73   73  ROOTSCRIPTFILE  = $(ROOTCMDDIR)/$(SCRIPTFILE)
  
    | 
      ↓ open down ↓ | 
    73 lines elided | 
    
      ↑ open up ↑ | 
  
  74   74  
  75   75  #
  76   76  # Native variant (used in ../seed)
  77   77  #
  78   78  $(NATIVE_BUILD)CC =     $(NATIVECC)
  79   79  $(NATIVE_BUILD)LD =     $(NATIVELD)
  80   80  $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
  81   81  $(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc
  82   82  $(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD
  83   83  $(NATIVE_BUILD)LDFLAGS =
  84      -$(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
       84 +$(NATIVE_BUILD)LDLIBS = -L$(NATIVE_ADJUNCT)/usr/lib \
       85 +                        -R$(NATIVE_ADJUNCT)/usr/lib \
  85   86                          -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native $(MYLDLIBS)
  86   87  
  87   88  DIRMODE = 0755
  88   89  FILEMODE = 0555
  89   90  
  90   91  OBJSQLITE =
  91   92  LIBSQLITE = -lsqlite-sys
  92   93  $(NATIVE_BUILD)OBJSQLITE = $(ROOT)/lib/libsqlite-native.o
  93   94  $(NATIVE_BUILD)LIBSQLITE =
  94   95  
  95   96  OBJS += $(OBJSQLITE)
  96   97  LDLIBS += $(LIBSQLITE)
  97   98  
  98   99  install := TARGET = install
  99  100  clobber := TARGET = clobber
 100  101  
 101  102  .KEEP_STATE:
 102  103  .PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o)
 103  104  
 104  105  all: $(PROG)
 105  106  
 106  107  native: FRC
 107  108          @cd $(LIBUUTIL)/native; pwd; $(MAKE) $(MFLAGS) install
 108  109          @NATIVE_BUILD= $(MAKE) $(MFLAGS) all
 109  110  
 110  111  $(PROG): $(OBJS)
 111  112          $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
 112  113          $(POST_PROCESS)
 113  114  
 114  115  %-native.o: %.c
 115  116          $(COMPILE.c) -o $@ $<
 116  117          $(POST_PROCESS_O)
 117  118  
 118  119  $(ROOTCMDDIR)/%: %.sh
 119  120          $(INS.rename)
 120  121  
 121  122  install: all $(ROOTCMD) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE)
 122  123  
 123  124  clean: FRC
 124  125          $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o)
 125  126  
 126  127  clobber:
 127  128  
 128  129  lint:   lint_SRCS
 129  130  
 130  131  lint_SRCS:
 131  132  
 132  133  include ../../Makefile.targ
 133  134  
 134  135  FRC:
  
    | 
      ↓ open down ↓ | 
    40 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX