forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmalloc-5.5.2-Makefile.in.patch
343 lines (308 loc) · 13.5 KB
/
dmalloc-5.5.2-Makefile.in.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,7 +41,7 @@
# thread version of the library
LIB_TH = lib$(MODULE)th.a
-LIB_TH_SL = lib$(MODULE)th.@shlibext@
+LIB_TH_SL = lib$(MODULE)th.@[email protected]
@TH_ON@BUILD_ALL_1 = threads
@TH_ON@INSTALL_LIB_1 = installth
@SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL)
@@ -50,8 +50,8 @@
@TH_ON@@SL_ON@INSTALL_LIB_2 = installthsl
# C++ version of the library
-LIB_CXX = lib$(MODULE)xx.a
-LIB_CXX_SL = lib$(MODULE)xx.@shlibext@
+LIB_CXX = lib$(MODULE)cxx.a
+LIB_CXX_SL = lib$(MODULE)cxx.@[email protected]
@CXX_ON@BUILD_ALL_3 = $(LIB_CXX)
@CXX_ON@INSTALL_LIB_3 = installcxx
@SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL)
@@ -61,7 +61,7 @@
# threads + C++
LIB_TH_CXX = lib$(MODULE)thcxx.a
-LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@
+LIB_TH_CXX_SL = lib$(MODULE)thcxx.@[email protected]
@TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX)
@TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx
@TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX)
@@ -76,7 +76,7 @@
@CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl
# shared versions of the libraries
-LIB_SL = lib$(MODULE).@shlibext@
+LIB_SL = lib$(MODULE).@[email protected]
@SL_ON@BUILD_ALL_7 = $(LIB_SL)
@SL_ON@INSTALL_LIB_7 = installsl
@SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL)
@@ -145,9 +145,13 @@
HFLS = dmalloc.h
OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o
+OBJS_SL = arg_check_sl.o compat_sl.o dmalloc_rand_sl.o dmalloc_tab_sl.o env_sl.o heap_sl.o
NORMAL_OBJS = chunk.o error.o malloc.o
+NORMAL_OBJS_SL = chunk_sl.o error_sl.o malloc_sl.o
THREAD_OBJS = chunk_th.o error_th.o malloc_th.o
+THREAD_OBJS_SL = chunk_th_sl.o error_th_sl.o malloc_th_sl.o
CXX_OBJS = dmallocc.o
+CXX_OBJS_SL = dmallocc_sl.o
CFLAGS = $(CCFLAGS)
TEST = $(MODULE)_t
@@ -160,9 +164,9 @@
clean :
rm -f $(A_OUT) core *.o *.t
- rm -f $(LIBRARY) $(LIB_TH) $(LIB_CXX) $(LIB_TH_CXX) $(TEST) $(TEST_FC)
- rm -f $(LIB_TH_SL) $(LIB_CXX_SL) $(LIB_TH_CXX_SL) $(LIB_SL)
+ rm -f $(TEST) $(TEST_FC)
rm -f $(UTIL) dmalloc.h
+ rm -f lib$(MODULE)*.*
realclean : clean
@@ -174,65 +178,65 @@
# rm -f configure
installdirs :
- $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
installincs : $(HFLS)
- $(srcdir)/mkinstalldirs $(includedir)
- $(INSTALL_DATA) $(HFLS) $(includedir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
+ $(INSTALL_DATA) $(HFLS) $(DESTDIR)$(includedir)
installthsl : $(LIB_TH_SL)
- $(srcdir)/mkinstalldirs $(libdir)
- $(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
+ $(INSTALL) $(LIB_TH_SL) $(DESTDIR)$(shlibdir)
installth : $(INSTALL_THREADS)
- $(srcdir)/mkinstalldirs $(libdir)
- $(INSTALL_PROGRAM) $(LIB_TH) $(libdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(INSTALL) $(LIB_TH) $(DESTDIR)$(libdir)
@CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
@SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library"
installthcxxsl : $(LIB_TH_CXX_SL)
- $(srcdir)/mkinstalldirs $(shlibdir)
- $(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
+ $(INSTALL) $(LIB_TH_CXX_SL) $(DESTDIR)$(libdir)
installthcxx : $(INSTALL_TH_CXX)
- $(srcdir)/mkinstalldirs $(libdir)
- $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(INSTALL) $(LIB_TH_CXX) $(DESTDIR)$(libdir)
@SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library"
installcxxsl : $(LIB_CXX_SL)
- $(srcdir)/mkinstalldirs $(libdir)
- $(INSTALL_PROGRAM) $(LIB_CXX_SL) $(libdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
+ $(INSTALL) $(LIB_CXX_SL) $(DESTDIR)$(shlibdir)
installcxx : $(INSTALL_CXX)
- $(srcdir)/mkinstalldirs $(libdir)
- $(INSTALL_PROGRAM) $(LIB_CXX) $(libdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(INSTALL) $(LIB_CXX) $(DESTDIR)$(libdir)
@TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
@SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
installsl : $(LIB_SL)
- $(srcdir)/mkinstalldirs $(shlibdir)
- $(INSTALL_PROGRAM) $(LIB_SL) $(shlibdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
+ $(INSTALL) $(LIB_SL) $(DESTDIR)$(shlibdir)
@CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
@TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library"
installlib : $(INSTALL_LIB)
- $(srcdir)/mkinstalldirs $(libdir)
- $(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
- @RANLIB@ $(libdir)/$(LIBRARY)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)
+ @RANLIB@ $(DESTDIR)$(libdir)/$(LIBRARY)
@SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
@CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library"
@TH_OFF@ @echo "Enter 'make installth' to install thread library"
installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \
$(srcdir)/docs/$(PDFFILE)
- $(srcdir)/mkinstalldirs $(docdir)
- $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir)
- $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir)
- $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir)
+ $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(DESTDIR)$(docdir)
+ $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(DESTDIR)$(docdir)
+ $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(DESTDIR)$(docdir)
install : installincs installlib $(UTIL)
- $(srcdir)/mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) $(UTIL) $(bindir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)$(bindir)
@echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)"
dmalloc.h.2 : $(srcdir)/configure
@@ -255,10 +259,8 @@
# NOTE: you may have to edit the configure.ac script to get this to
# work on your operating system. Please send feedback to the author
# via: http://256.com/gray/email.html
-$(LIB_SL) : $(LIBRARY)
- rm -f $@ [email protected]
- @shlinkargs@ $(LIBRARY) $(OBJS) $(NORMAL_OBJS)
- mv [email protected] $@
+$(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL)
+ $(CC) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL)
$(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
ar cr $@ $?
@@ -268,32 +270,26 @@
ar cr $@ $?
@RANLIB@ $@
-$(LIB_TH_SL) : $(LIB_TH)
- rm -f $@ [email protected]
- @shlinkargs@ $(LIB_TH) $(OBJS) $(THREAD_OBJS)
- mv [email protected] $@
+$(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL)
+ $(CC) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL)
$(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
ar cr $@ $?
@RANLIB@ $@
-$(LIB_CXX_SL) : $(LIB_CXX)
- rm -f $@ [email protected]
- @shlinkargs@ $(LIB_CXX) $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
- mv [email protected] $@
+$(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
+ $(CC) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
$(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
ar cr $@ $?
@RANLIB@ $@
-$(LIB_TH_CXX_SL) : $(LIB_TH_CXX)
- rm -f $@ [email protected]
- @shlinkargs@ $(LIB_TH_CXX) $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
- mv [email protected] $@
+$(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
+ $(CC) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
-threadssl : $(LIB_TH_SL)
+threadssl : $(LIB_TH_SL)$(ver)
-threadscxxsl : $(LIB_TH_CXX_SL)
+threadscxxsl : $(LIB_TH_CXX_SL)$(ver)
threadscxx : $(BUILD_TH_CXX)
@SL_OFF@ @echo "Enter 'make threadscxxsl' to build the threaded C++ shared-library"
@@ -302,7 +298,7 @@
@CXX_OFF@ @echo "Enter 'make threadscxx' to build the threaded C++ library"
@SL_OFF@ @echo "Enter 'make threadssl' to build the threaded shared library"
-cxxsl : $(LIB_CXX_SL)
+cxxsl : $(LIB_CXX_SL)$(ver)
cxx : $(BUILD_CXX)
@SL_OFF@ @echo "Enter 'make cxxsl' to build the cxx shared library"
@@ -371,6 +367,11 @@
$(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
-o ./$@
+dmallocc_sl.o : $(srcdir)/dmallocc.cc
+ rm -f $@
+ $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
+ -o ./$@
+
#
# auto configure settings - uncomment if you are doing configure
# development on the library
@@ -395,38 +396,109 @@
arg_check.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
dmalloc_loc.h error.h arg_check.h
+arg_check_sl.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
+ dmalloc_loc.h error.h arg_check.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
chunk.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
error_val.h heap.h
+chunk_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
+ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
+ error_val.h heap.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
+compat_sl.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
debug_tok.h dmalloc_loc.h env.h error_val.h version.h
+dmalloc_sl.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
+ debug_tok.h dmalloc_loc.h env.h error_val.h version.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
dmalloc_argv_loc.h compat.h
+dmalloc_argv_sl.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
+ dmalloc_argv_loc.h compat.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
+dmalloc_fc_t_sl.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
+ dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_rand.o: dmalloc_rand.c dmalloc_rand.h
+dmalloc_rand_sl.o: dmalloc_rand.c dmalloc_rand.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_t.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
error_val.h heap.h
+dmalloc_t_sl.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
+ dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
+ error_val.h heap.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_tab.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
+dmalloc_tab_sl.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
+ dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
env.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
debug_tok.h env.h error.h
+env_sl.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
+ debug_tok.h env.h error.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
error.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
dmalloc_loc.h env.h error.h error_val.h version.h
+error_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
+ dmalloc_loc.h env.h error.h error_val.h version.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
dmalloc_loc.h error.h error_val.h heap.h
+heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
+ dmalloc_loc.h error.h error_val.h heap.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
malloc.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
malloc_funcs.h return.h
+malloc_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
+ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
+ malloc_funcs.h return.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
heap.h protect.h
+protect_sl.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
+ heap.h protect.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
chunk_th.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
error_val.h heap.h
+chunk_th_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
+ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
+ error_val.h heap.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
error_th.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
dmalloc_loc.h env.h error.h error_val.h version.h
+error_th_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
+ dmalloc_loc.h env.h error.h error_val.h version.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
malloc_th.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
malloc_funcs.h return.h
+malloc_th_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
+ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
+ malloc_funcs.h return.h
+ rm -f $@
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@