Print this page
8411 Build should warn when linking against libraries outside proto area
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/fm/topo/libtopo/Makefile.com
+++ new/usr/src/lib/fm/topo/libtopo/Makefile.com
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 #
↓ 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 #
22 22 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
23 +# Copyright 2017 RackTop Systems.
23 24 #
24 25
25 26 LIBRARY = libtopo.a
26 27 VERS = .1
27 28
28 29 BUILTINSRCS = \
29 30 cpu.c \
30 31 dev.c \
31 32 fmd.c \
32 33 hc.c \
33 34 legacy_hc.c \
34 35 mem.c \
35 36 mod.c \
36 37 pkg.c \
37 38 svc.c \
38 39 sw.c \
39 40 zfs.c
40 41
41 42 LIBSRCS = \
42 43 topo_2xml.c \
43 44 topo_alloc.c \
44 45 topo_builtin.c \
45 46 topo_error.c \
46 47 topo_file.c \
47 48 topo_fmri.c \
48 49 topo_list.c \
49 50 topo_method.c \
50 51 topo_mod.c \
51 52 topo_module.c \
52 53 topo_node.c \
53 54 topo_nvl.c \
54 55 topo_parse.c \
55 56 topo_prop.c \
56 57 topo_protocol.c \
57 58 topo_rtld.c \
58 59 topo_snap.c \
59 60 topo_string.c \
60 61 topo_subr.c \
61 62 topo_tables.c \
62 63 topo_tree.c \
63 64 topo_xml.c
64 65
65 66 OBJECTS = $(BUILTINSRCS:%.c=%.o) $(LIBSRCS:%.c=%.o)
66 67
67 68 include ../../../../Makefile.lib
68 69 include ../../../Makefile.lib
69 70
70 71 SRCS = $(BUILTINSRCS:%.c=../common/%.c) $(LIBSRCS:%.c=../common/%.c)
71 72 LIBS = $(DYNLIB) $(LINTLIB)
72 73
73 74 SRCDIR = ../common
74 75
75 76 CLEANFILES += $(SRCDIR)/topo_error.c $(SRCDIR)/topo_tables.c
76 77
77 78 CPPFLAGS += -I../common -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I.
78 79 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
79 80 CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
80 81 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
81 82 CERRWARN += -_gcc=-Wno-uninitialized
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
82 83 CERRWARN += -_gcc=-Wno-switch
83 84 CERRWARN += -_gcc=-Wno-parentheses
84 85
85 86 LINTFLAGS = -msux
86 87 LINTFLAGS64 = -msux -m64
87 88
88 89 $(DYNLIB) := LDLIBS += \
89 90 -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -ldevinfo \
90 91 -lsmbios -lc -ldevid -lipmi -lscf
91 92
93 +# Allow libxml2 to be taken from the proto area.
94 +$(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libxml2.so
95 +
92 96 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
93 97 $(LINTLIB) := LINTFLAGS = -nsvx
94 98 $(LINTLIB) := LINTFLAGS64 = -nsvx -m64
95 99 $(LINTLIB) := LDLIBS += -lnvpair -lumem -lc
96 100
97 101 .KEEP_STATE:
98 102
99 103 all: $(LIBS)
100 104
101 105 lint: $(LINTLIB) lintcheck
102 106
103 107 pics/%.o: ../$(MACH)/%.c
104 108 $(COMPILE.c) -o $@ $<
105 109 $(POST_PROCESS_O)
106 110
107 111 %.o: ../common/%.c
108 112 $(COMPILE.c) -o $@ $<
109 113 $(POST_PROCESS_O)
110 114
111 115 ../common/topo_error.c: ../common/mkerror.sh ../common/topo_error.h
112 116 sh ../common/mkerror.sh liberrors < ../common/topo_error.h > $@
113 117 sh ../common/mkerror.sh properrors < ../common/libtopo.h >> $@
114 118 sh ../common/mkerror.sh methoderrors < ../common/libtopo.h >> $@
115 119 sh ../common/mkerror.sh fmrierrors < ../common/libtopo.h >> $@
116 120 sh ../common/mkerror.sh hdlerrors < ../common/libtopo.h >> $@
117 121 sh ../common/mkerror.sh moderrors < ../common/topo_mod.h >> $@
118 122
119 123 $(SRCDIR)/topo_tables.c: $(SRCDIR)/mktables.sh $(SRCDIR)/libtopo.h
120 124 sh $(SRCDIR)/mktables.sh $(SRCDIR)/libtopo.h > $@
121 125
122 126 include ../../../../Makefile.targ
123 127 include ../../../Makefile.targ
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX