Print this page
5468 Missing dependencies in lib/Makefile
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libdtrace/Makefile.com
+++ new/usr/src/lib/libdtrace/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 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
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) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2012 by Delphix. All rights reserved.
24 +# Copyright 2015 RackTop Systems.
24 25 #
25 26
26 27 LIBRARY = libdtrace.a
27 28 VERS = .1
28 29
29 30 LIBSRCS = \
30 31 dt_aggregate.c \
31 32 dt_as.c \
32 33 dt_buf.c \
33 34 dt_cc.c \
34 35 dt_cg.c \
35 36 dt_consume.c \
36 37 dt_decl.c \
37 38 dt_dis.c \
38 39 dt_dof.c \
39 40 dt_error.c \
40 41 dt_errtags.c \
41 42 dt_handle.c \
42 43 dt_ident.c \
43 44 dt_inttab.c \
44 45 dt_link.c \
45 46 dt_list.c \
46 47 dt_open.c \
47 48 dt_options.c \
48 49 dt_program.c \
49 50 dt_map.c \
50 51 dt_module.c \
51 52 dt_names.c \
52 53 dt_parser.c \
53 54 dt_pcb.c \
54 55 dt_pid.c \
55 56 dt_pq.c \
56 57 dt_pragma.c \
57 58 dt_print.c \
58 59 dt_printf.c \
59 60 dt_proc.c \
60 61 dt_provider.c \
61 62 dt_regset.c \
62 63 dt_string.c \
63 64 dt_strtab.c \
64 65 dt_subr.c \
65 66 dt_work.c \
66 67 dt_xlator.c
67 68
68 69 LIBISASRCS = \
69 70 dt_isadep.c
70 71
71 72 OBJECTS = dt_lex.o dt_grammar.o $(MACHOBJS) $(LIBSRCS:%.c=%.o) $(LIBISASRCS:%.c=%.o)
72 73
73 74 DRTISRCS = dlink_init.c dlink_common.c
74 75 DRTIOBJS = $(DRTISRCS:%.c=pics/%.o)
75 76 DRTIOBJ = drti.o
76 77
77 78 LIBDAUDITSRCS = dlink_audit.c dlink_common.c
78 79 LIBDAUDITOBJS = $(LIBDAUDITSRCS:%.c=pics/%.o)
79 80 LIBDAUDIT = libdtrace_forceload.so
80 81
81 82 DLINKSRCS = dlink_common.c dlink_init.c dlink_audit.c
82 83
83 84 DLIBSRCS += \
84 85 errno.d \
85 86 fc.d \
86 87 io.d \
87 88 ip.d \
88 89 iscsit.d \
89 90 net.d \
90 91 nfs.d \
91 92 nfssrv.d \
92 93 procfs.d \
93 94 regs.d \
94 95 sched.d \
95 96 signal.d \
96 97 scsi.d \
97 98 srp.d \
98 99 sysevent.d \
99 100 tcp.d \
100 101 udp.d \
101 102 unistd.d
102 103
103 104 include ../../Makefile.lib
104 105
105 106 SRCS = $(LIBSRCS:%.c=../common/%.c) $(LIBISASRCS:%.c=../$(MACH)/%.c)
106 107 LIBS = $(DYNLIB) $(LINTLIB)
107 108
108 109 SRCDIR = ../common
109 110
110 111 CLEANFILES += dt_lex.c dt_grammar.c dt_grammar.h y.output
111 112 CLEANFILES += ../common/procfs.sed ../common/procfs.d
112 113 CLEANFILES += ../common/io.sed ../common/io.d
113 114 CLEANFILES += ../common/ip.sed ../common/ip.d
114 115 CLEANFILES += ../common/net.sed ../common/net.d
115 116 CLEANFILES += ../common/errno.d ../common/signal.d
116 117 CLEANFILES += ../common/dt_errtags.c ../common/dt_names.c
117 118 CLEANFILES += ../common/sysevent.sed ../common/sysevent.d
118 119 CLEANFILES += ../common/tcp.sed ../common/tcp.d
119 120 CLEANFILES += ../common/udp.sed ../common/udp.d
120 121 CLEANFILES += $(LIBDAUDITOBJS) $(DRTIOBJS)
121 122
122 123 CLOBBERFILES += $(LIBDAUDIT) drti.o
123 124
124 125 CPPFLAGS += -I../common -I.
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
125 126 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
126 127 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
127 128
128 129 CERRWARN += -_gcc=-Wno-unused-label
129 130 CERRWARN += -_gcc=-Wno-unused-variable
130 131 CERRWARN += -_gcc=-Wno-parentheses
131 132 CERRWARN += -_gcc=-Wno-uninitialized
132 133 CERRWARN += -_gcc=-Wno-switch
133 134
134 135 YYCFLAGS =
135 -LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
136 -DRTILDLIBS = $(LDLIBS.lib) -lc
136 +$(LIBS) := LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
137 137
138 138 yydebug := YYCFLAGS += -DYYDEBUG
139 139
140 140 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
141 141
142 142 LFLAGS = -t -v
143 143 YFLAGS = -d -v
144 144
145 145 ROOTDLIBDIR = $(ROOT)/usr/lib/dtrace
146 146 ROOTDLIBDIR64 = $(ROOT)/usr/lib/dtrace/64
147 147
148 148 ROOTDLIBS = $(DLIBSRCS:%=$(ROOTDLIBDIR)/%)
149 149 ROOTDOBJS = $(ROOTDLIBDIR)/$(DRTIOBJ) $(ROOTDLIBDIR)/$(LIBDAUDIT)
150 150 ROOTDOBJS64 = $(ROOTDLIBDIR64)/$(DRTIOBJ) $(ROOTDLIBDIR64)/$(LIBDAUDIT)
151 151
152 152 $(ROOTDLIBDIR)/%.d := FILEMODE=444
153 153 $(ROOTDLIBDIR)/%.o := FILEMODE=444
154 154 $(ROOTDLIBDIR64)/%.o := FILEMODE=444
↓ open down ↓ |
8 lines elided |
↑ open up ↑ |
155 155 $(ROOTDLIBDIR)/%.so := FILEMODE=555
156 156 $(ROOTDLIBDIR64)/%.so := FILEMODE=555
157 157
158 158 .KEEP_STATE:
159 159
160 160 all: $(LIBS) $(DRTIOBJ) $(LIBDAUDIT)
161 161
162 162 lint: lintdlink lintcheck
163 163
164 164 lintdlink: $(DLINKSRCS:%.c=../common/%.c)
165 - $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(DRTILDLIBS)
165 + $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(LDLIBS) -lc
166 166
167 167 dt_lex.c: $(SRCDIR)/dt_lex.l dt_grammar.h
168 168 $(LEX) $(LFLAGS) $(SRCDIR)/dt_lex.l > $@
169 169
170 170 dt_grammar.c dt_grammar.h: $(SRCDIR)/dt_grammar.y
171 171 $(YACC) $(YFLAGS) $(SRCDIR)/dt_grammar.y
172 172 @mv y.tab.h dt_grammar.h
173 173 @mv y.tab.c dt_grammar.c
174 174
175 175 pics/dt_lex.o pics/dt_grammar.o := CFLAGS += $(YYCFLAGS)
176 176 pics/dt_lex.o pics/dt_grammar.o := CFLAGS64 += $(YYCFLAGS)
177 177
178 178 pics/dt_lex.o pics/dt_grammar.o := CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
179 179 pics/dt_lex.o pics/dt_grammar.o := CCVERBOSE =
180 180
181 181 ../common/dt_errtags.c: ../common/mkerrtags.sh ../common/dt_errtags.h
182 182 sh ../common/mkerrtags.sh < ../common/dt_errtags.h > $@
183 183
184 184 ../common/dt_names.c: ../common/mknames.sh $(SRC)/uts/common/sys/dtrace.h
185 185 sh ../common/mknames.sh < $(SRC)/uts/common/sys/dtrace.h > $@
186 186
187 187 ../common/errno.d: ../common/mkerrno.sh $(SRC)/uts/common/sys/errno.h
188 188 sh ../common/mkerrno.sh < $(SRC)/uts/common/sys/errno.h > $@
189 189
190 190 ../common/signal.d: ../common/mksignal.sh $(SRC)/uts/common/sys/iso/signal_iso.h
191 191 sh ../common/mksignal.sh < $(SRC)/uts/common/sys/iso/signal_iso.h > $@
192 192
193 193 ../common/%.sed: ../common/%.sed.in
194 194 $(COMPILE.cpp) -D_KERNEL $< | tr -d ' ' | tr '"' '@' | \
195 195 sed 's/\&/\\\&/g' | grep '^s/' > $@
196 196
197 197 ../common/procfs.d: ../common/procfs.sed ../common/procfs.d.in
198 198 sed -f ../common/procfs.sed < ../common/procfs.d.in > $@
199 199
200 200 ../common/io.d: ../common/io.sed ../common/io.d.in
201 201 sed -f ../common/io.sed < ../common/io.d.in > $@
202 202
203 203 ../common/ip.d: ../common/ip.sed ../common/ip.d.in
204 204 sed -f ../common/ip.sed < ../common/ip.d.in > $@
205 205
206 206 ../common/net.d: ../common/net.sed ../common/net.d.in
207 207 sed -f ../common/net.sed < ../common/net.d.in > $@
208 208
209 209 ../common/sysevent.d: ../common/sysevent.sed ../common/sysevent.d.in
210 210 sed -f ../common/sysevent.sed < ../common/sysevent.d.in > $@
211 211
212 212 ../common/tcp.d: ..//common/tcp.sed ../common/tcp.d.in
213 213 sed -f ../common/tcp.sed < ../common/tcp.d.in > $@
214 214
215 215 ../common/udp.d: ../common/udp.sed ../common/udp.d.in
216 216 sed -f ../common/udp.sed < ../common/udp.d.in > $@
217 217
218 218 pics/%.o: ../$(MACH)/%.c
219 219 $(COMPILE.c) -o $@ $<
220 220 $(POST_PROCESS_O)
221 221
↓ open down ↓ |
46 lines elided |
↑ open up ↑ |
222 222 pics/%.o: ../$(MACH)/%.s
223 223 $(COMPILE.s) -o $@ $<
224 224 $(POST_PROCESS_O)
225 225
226 226 $(DRTIOBJ): $(DRTIOBJS)
227 227 $(LD) -o $@ -r -Blocal -Breduce $(DRTIOBJS)
228 228 $(POST_PROCESS_O)
229 229
230 230 $(LIBDAUDIT): $(LIBDAUDITOBJS)
231 231 $(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
232 - $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) \
232 + $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) $(LDLIBS) \
233 233 -lmapmalloc -lc -lproc
234 234 $(POST_PROCESS_SO)
235 235
236 236 $(ROOTDLIBDIR):
237 237 $(INS.dir)
238 238
239 239 $(ROOTDLIBDIR64): $(ROOTDLIBDIR)
240 240 $(INS.dir)
241 241
242 242 $(ROOTDLIBDIR)/%.d: ../common/%.d
243 243 $(INS.file)
244 244
245 245 $(ROOTDLIBDIR)/%.d: ../$(MACH)/%.d
246 246 $(INS.file)
247 247
248 248 $(ROOTDLIBDIR)/%.d: %.d
249 249 $(INS.file)
250 250
251 251 $(ROOTDLIBDIR)/%.o: %.o
252 252 $(INS.file)
253 253
254 254 $(ROOTDLIBDIR64)/%.o: %.o
255 255 $(INS.file)
256 256
257 257 $(ROOTDLIBDIR)/%.so: %.so
258 258 $(INS.file)
259 259
260 260 $(ROOTDLIBDIR64)/%.so: %.so
261 261 $(INS.file)
262 262
263 263 $(ROOTDLIBS): $(ROOTDLIBDIR)
264 264
265 265 $(ROOTDOBJS): $(ROOTDLIBDIR)
266 266
267 267 $(ROOTDOBJS64): $(ROOTDLIBDIR64)
268 268
269 269 include ../../Makefile.targ
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX