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


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

  28 #
  29 
  30 PROG = isns
  31 
  32 DSRC = isns_provider.d
  33 DTRACE_HEADER = $(DSRC:%.d=%.h)
  34 
  35 COBJS   = main.o qry.o admintf.o dsapi.o log.o sched.o dseng.o scn.o cache.o
  36 COBJS   += dump.o msgq.o server.o config.o esi.o obj.o utils.o dd.o func.o
  37 COBJS   += pdu.o door.o htable.o
  38 OBJS    = $(COBJS) $(DSRC:%.d=%.o)
  39 SRCS    = $(COBJS:%.o=%.c)
  40 POFILE= isns.po
  41 POFILES = $(COBJS:%.o=%.po)
  42 
  43 include ../../Makefile.cmd
  44 
  45 DATA_STORE      = xml
  46 XML_DIR         = xml_def
  47 ISNS_SVC        = $(XML_DIR)/isns_server.xml


  53 CFLAGS          +=      $(CCVERBOSE)
  54 CPPFLAGS        += -I./ -I$(ADJUNCT_PROTO)/usr/include/libxml2
  55 CPPFLAGS        += -DTARGET_DATA_STORE=$(DATA_STORE)
  56 CPPFLAGS        += -D_POSIX_PTHREAD_SEMANTICS
  57 LINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
  58 LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
  59 LINTFLAGS += -xerroff=E_CASE_FALLTHRU
  60 
  61 CERRWARN += -_gcc=-Wno-char-subscripts
  62 CERRWARN += -_gcc=-Wno-ignored-qualifiers
  63 CERRWARN += -_gcc=-Wno-uninitialized
  64 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  65 
  66 CLOBBERFILES += $(DTRACE_HEADER)
  67 
  68 obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
  69 obj.o := CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
  70 
  71 LDLIBS          += -lsecdb -lsocket -lnsl -lscf -lxml2
  72 



  73 .KEEP_STATE:
  74 
  75 all:    $(PROG)
  76 
  77 $(PROG): $(OBJS)
  78         $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
  79         $(POST_PROCESS)
  80 
  81 %.h: %.d
  82         $(DTRACE) -h -s $< -o $@
  83 
  84 %.o:    %.c $(DTRACE_HEADER)
  85         $(COMPILE.c) $<
  86         $(POST_PROCESS_O)
  87 
  88 %.o:    %.d $(COBJS)
  89         $(COMPILE.d) -s $< $(COBJS)
  90         $(POST_PROCESS_O)
  91 
  92 clean:


   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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 
  26 #
  27 # Copyright (c) 2012 by Delphix. All rights reserved.
  28 # Copyright 2017 RackTop Systems.
  29 #
  30 
  31 PROG = isns
  32 
  33 DSRC = isns_provider.d
  34 DTRACE_HEADER = $(DSRC:%.d=%.h)
  35 
  36 COBJS   = main.o qry.o admintf.o dsapi.o log.o sched.o dseng.o scn.o cache.o
  37 COBJS   += dump.o msgq.o server.o config.o esi.o obj.o utils.o dd.o func.o
  38 COBJS   += pdu.o door.o htable.o
  39 OBJS    = $(COBJS) $(DSRC:%.d=%.o)
  40 SRCS    = $(COBJS:%.o=%.c)
  41 POFILE= isns.po
  42 POFILES = $(COBJS:%.o=%.po)
  43 
  44 include ../../Makefile.cmd
  45 
  46 DATA_STORE      = xml
  47 XML_DIR         = xml_def
  48 ISNS_SVC        = $(XML_DIR)/isns_server.xml


  54 CFLAGS          +=      $(CCVERBOSE)
  55 CPPFLAGS        += -I./ -I$(ADJUNCT_PROTO)/usr/include/libxml2
  56 CPPFLAGS        += -DTARGET_DATA_STORE=$(DATA_STORE)
  57 CPPFLAGS        += -D_POSIX_PTHREAD_SEMANTICS
  58 LINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
  59 LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
  60 LINTFLAGS += -xerroff=E_CASE_FALLTHRU
  61 
  62 CERRWARN += -_gcc=-Wno-char-subscripts
  63 CERRWARN += -_gcc=-Wno-ignored-qualifiers
  64 CERRWARN += -_gcc=-Wno-uninitialized
  65 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  66 
  67 CLOBBERFILES += $(DTRACE_HEADER)
  68 
  69 obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
  70 obj.o := CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
  71 
  72 LDLIBS          += -lsecdb -lsocket -lnsl -lscf -lxml2
  73 
  74 # Allow libxml2 to be taken from outside the proto area.
  75 $(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libxml2.so
  76 
  77 .KEEP_STATE:
  78 
  79 all:    $(PROG)
  80 
  81 $(PROG): $(OBJS)
  82         $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
  83         $(POST_PROCESS)
  84 
  85 %.h: %.d
  86         $(DTRACE) -h -s $< -o $@
  87 
  88 %.o:    %.c $(DTRACE_HEADER)
  89         $(COMPILE.c) $<
  90         $(POST_PROCESS_O)
  91 
  92 %.o:    %.d $(COBJS)
  93         $(COMPILE.d) -s $< $(COBJS)
  94         $(POST_PROCESS_O)
  95 
  96 clean: