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


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

  23 #
  24 
  25 LIBRARY = libtopo.a
  26 VERS = .1
  27 
  28 BUILTINSRCS = \
  29         cpu.c \
  30         dev.c \
  31         fmd.c \
  32         hc.c \
  33         legacy_hc.c \
  34         mem.c \
  35         mod.c \
  36         pkg.c \
  37         svc.c \
  38         sw.c \
  39         zfs.c
  40 
  41 LIBSRCS = \
  42         topo_2xml.c \


  72 
  73 SRCDIR =        ../common
  74 
  75 CLEANFILES += $(SRCDIR)/topo_error.c $(SRCDIR)/topo_tables.c
  76 
  77 CPPFLAGS += -I../common -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I.
  78 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
  79 CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
  80 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
  81 CERRWARN += -_gcc=-Wno-uninitialized
  82 CERRWARN += -_gcc=-Wno-switch
  83 CERRWARN += -_gcc=-Wno-parentheses
  84 
  85 LINTFLAGS = -msux
  86 LINTFLAGS64 = -msux -m64
  87 
  88 $(DYNLIB)  := LDLIBS += \
  89         -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -ldevinfo \
  90         -lsmbios -lc -ldevid -lipmi -lscf
  91 



  92 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
  93 $(LINTLIB) := LINTFLAGS = -nsvx
  94 $(LINTLIB) := LINTFLAGS64 = -nsvx -m64
  95 $(LINTLIB) := LDLIBS += -lnvpair -lumem -lc
  96 
  97 .KEEP_STATE:
  98 
  99 all: $(LIBS)
 100 
 101 lint: $(LINTLIB) lintcheck
 102 
 103 pics/%.o: ../$(MACH)/%.c
 104         $(COMPILE.c) -o $@ $<
 105         $(POST_PROCESS_O)
 106 
 107 %.o: ../common/%.c
 108         $(COMPILE.c) -o $@ $<
 109         $(POST_PROCESS_O)
 110 
 111 ../common/topo_error.c: ../common/mkerror.sh ../common/topo_error.h


   3 #
   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 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2017 RackTop Systems.
  24 #
  25 
  26 LIBRARY = libtopo.a
  27 VERS = .1
  28 
  29 BUILTINSRCS = \
  30         cpu.c \
  31         dev.c \
  32         fmd.c \
  33         hc.c \
  34         legacy_hc.c \
  35         mem.c \
  36         mod.c \
  37         pkg.c \
  38         svc.c \
  39         sw.c \
  40         zfs.c
  41 
  42 LIBSRCS = \
  43         topo_2xml.c \


  73 
  74 SRCDIR =        ../common
  75 
  76 CLEANFILES += $(SRCDIR)/topo_error.c $(SRCDIR)/topo_tables.c
  77 
  78 CPPFLAGS += -I../common -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I.
  79 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
  80 CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
  81 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
  82 CERRWARN += -_gcc=-Wno-uninitialized
  83 CERRWARN += -_gcc=-Wno-switch
  84 CERRWARN += -_gcc=-Wno-parentheses
  85 
  86 LINTFLAGS = -msux
  87 LINTFLAGS64 = -msux -m64
  88 
  89 $(DYNLIB)  := LDLIBS += \
  90         -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -ldevinfo \
  91         -lsmbios -lc -ldevid -lipmi -lscf
  92 
  93 # Allow libxml2 to be taken from the proto area.
  94 $(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libxml2.so
  95 
  96 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
  97 $(LINTLIB) := LINTFLAGS = -nsvx
  98 $(LINTLIB) := LINTFLAGS64 = -nsvx -m64
  99 $(LINTLIB) := LDLIBS += -lnvpair -lumem -lc
 100 
 101 .KEEP_STATE:
 102 
 103 all: $(LIBS)
 104 
 105 lint: $(LINTLIB) lintcheck
 106 
 107 pics/%.o: ../$(MACH)/%.c
 108         $(COMPILE.c) -o $@ $<
 109         $(POST_PROCESS_O)
 110 
 111 %.o: ../common/%.c
 112         $(COMPILE.c) -o $@ $<
 113         $(POST_PROCESS_O)
 114 
 115 ../common/topo_error.c: ../common/mkerror.sh ../common/topo_error.h