]> git.proxmox.com Git - rustc.git/blob - src/jemalloc/Makefile.in
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / jemalloc / Makefile.in
1 # Clear out all vpaths, then set just one (default vpath) for the main build
2 # directory.
3 vpath
4 vpath % .
5
6 # Clear the default suffixes, so that built-in rules are not used.
7 .SUFFIXES :
8
9 SHELL := /bin/sh
10
11 CC := @CC@
12
13 # Configuration parameters.
14 DESTDIR =
15 BINDIR := $(DESTDIR)@BINDIR@
16 INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@
17 LIBDIR := $(DESTDIR)@LIBDIR@
18 DATADIR := $(DESTDIR)@DATADIR@
19 MANDIR := $(DESTDIR)@MANDIR@
20 srcroot := @srcroot@
21 objroot := @objroot@
22 abs_srcroot := @abs_srcroot@
23 abs_objroot := @abs_objroot@
24
25 # Build parameters.
26 CPPFLAGS := @CPPFLAGS@ -I$(srcroot)include -I$(objroot)include
27 CFLAGS := @CFLAGS@
28 LDFLAGS := @LDFLAGS@
29 EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
30 LIBS := @LIBS@
31 TESTLIBS := @TESTLIBS@
32 RPATH_EXTRA := @RPATH_EXTRA@
33 SO := @so@
34 IMPORTLIB := @importlib@
35 O := @o@
36 A := @a@
37 EXE := @exe@
38 LIBPREFIX := @libprefix@
39 REV := @rev@
40 install_suffix := @install_suffix@
41 ABI := @abi@
42 XSLTPROC := @XSLTPROC@
43 AUTOCONF := @AUTOCONF@
44 _RPATH = @RPATH@
45 RPATH = $(if $(1),$(call _RPATH,$(1)))
46 cfghdrs_in := $(addprefix $(srcroot),@cfghdrs_in@)
47 cfghdrs_out := @cfghdrs_out@
48 cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@)
49 cfgoutputs_out := @cfgoutputs_out@
50 enable_autogen := @enable_autogen@
51 enable_code_coverage := @enable_code_coverage@
52 enable_prof := @enable_prof@
53 enable_valgrind := @enable_valgrind@
54 enable_zone_allocator := @enable_zone_allocator@
55 MALLOC_CONF := @JEMALLOC_CPREFIX@MALLOC_CONF
56 DSO_LDFLAGS = @DSO_LDFLAGS@
57 SOREV = @SOREV@
58 PIC_CFLAGS = @PIC_CFLAGS@
59 CTARGET = @CTARGET@
60 LDTARGET = @LDTARGET@
61 MKLIB = @MKLIB@
62 AR = @AR@
63 ARFLAGS = @ARFLAGS@
64 CC_MM = @CC_MM@
65
66 ifeq (macho, $(ABI))
67 TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib"
68 else
69 ifeq (pecoff, $(ABI))
70 TEST_LIBRARY_PATH := PATH="$(PATH):$(objroot)lib"
71 else
72 TEST_LIBRARY_PATH :=
73 endif
74 endif
75
76 LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
77
78 # Lists of files.
79 BINS := $(objroot)bin/jemalloc-config $(objroot)bin/jemalloc.sh $(objroot)bin/jeprof
80 C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h
81 C_SRCS := $(srcroot)src/jemalloc.c \
82 $(srcroot)src/arena.c \
83 $(srcroot)src/atomic.c \
84 $(srcroot)src/base.c \
85 $(srcroot)src/bitmap.c \
86 $(srcroot)src/chunk.c \
87 $(srcroot)src/chunk_dss.c \
88 $(srcroot)src/chunk_mmap.c \
89 $(srcroot)src/ckh.c \
90 $(srcroot)src/ctl.c \
91 $(srcroot)src/extent.c \
92 $(srcroot)src/hash.c \
93 $(srcroot)src/huge.c \
94 $(srcroot)src/mb.c \
95 $(srcroot)src/mutex.c \
96 $(srcroot)src/nstime.c \
97 $(srcroot)src/pages.c \
98 $(srcroot)src/prng.c \
99 $(srcroot)src/prof.c \
100 $(srcroot)src/quarantine.c \
101 $(srcroot)src/rtree.c \
102 $(srcroot)src/stats.c \
103 $(srcroot)src/tcache.c \
104 $(srcroot)src/ticker.c \
105 $(srcroot)src/tsd.c \
106 $(srcroot)src/util.c
107 ifeq ($(enable_valgrind), 1)
108 C_SRCS += $(srcroot)src/valgrind.c
109 endif
110 ifeq ($(enable_zone_allocator), 1)
111 C_SRCS += $(srcroot)src/zone.c
112 endif
113 ifeq ($(IMPORTLIB),$(SO))
114 STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A)
115 endif
116 ifdef PIC_CFLAGS
117 STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A)
118 else
119 STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A)
120 endif
121 DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV)
122 ifneq ($(SOREV),$(SO))
123 DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO)
124 endif
125 PC := $(objroot)jemalloc.pc
126 MAN3 := $(objroot)doc/jemalloc$(install_suffix).3
127 DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml
128 DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.html)
129 DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.3)
130 DOCS := $(DOCS_HTML) $(DOCS_MAN3)
131 C_TESTLIB_SRCS := $(srcroot)test/src/btalloc.c $(srcroot)test/src/btalloc_0.c \
132 $(srcroot)test/src/btalloc_1.c $(srcroot)test/src/math.c \
133 $(srcroot)test/src/mtx.c $(srcroot)test/src/mq.c \
134 $(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \
135 $(srcroot)test/src/thd.c $(srcroot)test/src/timer.c
136 C_UTIL_INTEGRATION_SRCS := $(srcroot)src/nstime.c $(srcroot)src/util.c
137 TESTS_UNIT := $(srcroot)test/unit/atomic.c \
138 $(srcroot)test/unit/bitmap.c \
139 $(srcroot)test/unit/ckh.c \
140 $(srcroot)test/unit/decay.c \
141 $(srcroot)test/unit/hash.c \
142 $(srcroot)test/unit/junk.c \
143 $(srcroot)test/unit/junk_alloc.c \
144 $(srcroot)test/unit/junk_free.c \
145 $(srcroot)test/unit/lg_chunk.c \
146 $(srcroot)test/unit/mallctl.c \
147 $(srcroot)test/unit/math.c \
148 $(srcroot)test/unit/mq.c \
149 $(srcroot)test/unit/mtx.c \
150 $(srcroot)test/unit/prng.c \
151 $(srcroot)test/unit/prof_accum.c \
152 $(srcroot)test/unit/prof_active.c \
153 $(srcroot)test/unit/prof_gdump.c \
154 $(srcroot)test/unit/prof_idump.c \
155 $(srcroot)test/unit/prof_reset.c \
156 $(srcroot)test/unit/prof_thread_name.c \
157 $(srcroot)test/unit/ql.c \
158 $(srcroot)test/unit/qr.c \
159 $(srcroot)test/unit/quarantine.c \
160 $(srcroot)test/unit/rb.c \
161 $(srcroot)test/unit/rtree.c \
162 $(srcroot)test/unit/run_quantize.c \
163 $(srcroot)test/unit/SFMT.c \
164 $(srcroot)test/unit/size_classes.c \
165 $(srcroot)test/unit/smoothstep.c \
166 $(srcroot)test/unit/stats.c \
167 $(srcroot)test/unit/ticker.c \
168 $(srcroot)test/unit/nstime.c \
169 $(srcroot)test/unit/tsd.c \
170 $(srcroot)test/unit/util.c \
171 $(srcroot)test/unit/zero.c
172 TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \
173 $(srcroot)test/integration/allocated.c \
174 $(srcroot)test/integration/sdallocx.c \
175 $(srcroot)test/integration/mallocx.c \
176 $(srcroot)test/integration/MALLOCX_ARENA.c \
177 $(srcroot)test/integration/overflow.c \
178 $(srcroot)test/integration/posix_memalign.c \
179 $(srcroot)test/integration/rallocx.c \
180 $(srcroot)test/integration/thread_arena.c \
181 $(srcroot)test/integration/thread_tcache_enabled.c \
182 $(srcroot)test/integration/xallocx.c \
183 $(srcroot)test/integration/chunk.c
184 TESTS_STRESS := $(srcroot)test/stress/microbench.c
185 TESTS := $(TESTS_UNIT) $(TESTS_INTEGRATION) $(TESTS_STRESS)
186
187 C_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.$(O))
188 C_PIC_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.pic.$(O))
189 C_JET_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.$(O))
190 C_TESTLIB_UNIT_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.unit.$(O))
191 C_TESTLIB_INTEGRATION_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
192 C_UTIL_INTEGRATION_OBJS := $(C_UTIL_INTEGRATION_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
193 C_TESTLIB_STRESS_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.stress.$(O))
194 C_TESTLIB_OBJS := $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(C_TESTLIB_STRESS_OBJS)
195
196 TESTS_UNIT_OBJS := $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%.$(O))
197 TESTS_INTEGRATION_OBJS := $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%.$(O))
198 TESTS_STRESS_OBJS := $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%.$(O))
199 TESTS_OBJS := $(TESTS_UNIT_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_STRESS_OBJS)
200
201 .PHONY: all dist build_doc_html build_doc_man build_doc
202 .PHONY: install_bin install_include install_lib
203 .PHONY: install_doc_html install_doc_man install_doc install
204 .PHONY: tests check clean distclean relclean
205
206 .SECONDARY : $(TESTS_OBJS)
207
208 # Default target.
209 all: build_lib
210
211 dist: build_doc
212
213 $(objroot)doc/%.html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl
214 $(XSLTPROC) -o $@ $(objroot)doc/html.xsl $<
215
216 $(objroot)doc/%.3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl
217 $(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $<
218
219 build_doc_html: $(DOCS_HTML)
220 build_doc_man: $(DOCS_MAN3)
221 build_doc: $(DOCS)
222
223 #
224 # Include generated dependency files.
225 #
226 ifdef CC_MM
227 -include $(C_OBJS:%.$(O)=%.d)
228 -include $(C_PIC_OBJS:%.$(O)=%.d)
229 -include $(C_JET_OBJS:%.$(O)=%.d)
230 -include $(C_TESTLIB_OBJS:%.$(O)=%.d)
231 -include $(TESTS_OBJS:%.$(O)=%.d)
232 endif
233
234 $(C_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c
235 $(C_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c
236 $(C_PIC_OBJS): CFLAGS += $(PIC_CFLAGS)
237 $(C_JET_OBJS): $(objroot)src/%.jet.$(O): $(srcroot)src/%.c
238 $(C_JET_OBJS): CFLAGS += -DJEMALLOC_JET
239 $(C_TESTLIB_UNIT_OBJS): $(objroot)test/src/%.unit.$(O): $(srcroot)test/src/%.c
240 $(C_TESTLIB_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
241 $(C_TESTLIB_INTEGRATION_OBJS): $(objroot)test/src/%.integration.$(O): $(srcroot)test/src/%.c
242 $(C_TESTLIB_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
243 $(C_UTIL_INTEGRATION_OBJS): $(objroot)src/%.integration.$(O): $(srcroot)src/%.c
244 $(C_TESTLIB_STRESS_OBJS): $(objroot)test/src/%.stress.$(O): $(srcroot)test/src/%.c
245 $(C_TESTLIB_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST -DJEMALLOC_STRESS_TESTLIB
246 $(C_TESTLIB_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
247 $(TESTS_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
248 $(TESTS_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
249 $(TESTS_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST
250 $(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c
251 $(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
252 ifneq ($(IMPORTLIB),$(SO))
253 $(C_OBJS) $(C_JET_OBJS): CPPFLAGS += -DDLLEXPORT
254 endif
255
256 ifndef CC_MM
257 # Dependencies.
258 HEADER_DIRS = $(srcroot)include/jemalloc/internal \
259 $(objroot)include/jemalloc $(objroot)include/jemalloc/internal
260 HEADERS = $(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h))
261 $(C_OBJS) $(C_PIC_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): $(HEADERS)
262 $(TESTS_OBJS): $(objroot)test/include/test/jemalloc_test.h
263 endif
264
265 $(C_OBJS) $(C_PIC_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): %.$(O):
266 @mkdir -p $(@D)
267 $(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
268 ifdef CC_MM
269 @$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
270 endif
271
272 ifneq ($(SOREV),$(SO))
273 %.$(SO) : %.$(SOREV)
274 @mkdir -p $(@D)
275 ln -sf $(<F) $@
276 endif
277
278 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(C_PIC_OBJS),$(C_OBJS))
279 @mkdir -p $(@D)
280 $(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)
281
282 $(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(C_PIC_OBJS)
283 $(objroot)lib/$(LIBJEMALLOC).$(A) : $(C_OBJS)
284 $(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(C_OBJS)
285
286 $(STATIC_LIBS):
287 @mkdir -p $(@D)
288 $(AR) $(ARFLAGS)@AROUT@ $+
289
290 $(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(TESTS_UNIT_LINK_OBJS) $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS)
291 @mkdir -p $(@D)
292 $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(TESTLIBS) $(EXTRA_LDFLAGS)
293
294 $(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
295 @mkdir -p $(@D)
296 $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(filter -lpthread,$(LIBS))) -lm $(TESTLIBS) $(EXTRA_LDFLAGS)
297
298 $(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
299 @mkdir -p $(@D)
300 $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(TESTLIBS) $(EXTRA_LDFLAGS)
301
302 build_lib_shared: $(DSOS)
303 build_lib_static: $(STATIC_LIBS)
304 build_lib: build_lib_shared build_lib_static
305
306 install_bin:
307 install -d $(BINDIR)
308 @for b in $(BINS); do \
309 echo "install -m 755 $$b $(BINDIR)"; \
310 install -m 755 $$b $(BINDIR); \
311 done
312
313 install_include:
314 install -d $(INCLUDEDIR)/jemalloc
315 @for h in $(C_HDRS); do \
316 echo "install -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
317 install -m 644 $$h $(INCLUDEDIR)/jemalloc; \
318 done
319
320 install_lib_shared: $(DSOS)
321 install -d $(LIBDIR)
322 install -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
323 ifneq ($(SOREV),$(SO))
324 ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO)
325 endif
326
327 install_lib_static: $(STATIC_LIBS)
328 install -d $(LIBDIR)
329 @for l in $(STATIC_LIBS); do \
330 echo "install -m 755 $$l $(LIBDIR)"; \
331 install -m 755 $$l $(LIBDIR); \
332 done
333
334 install_lib_pc: $(PC)
335 install -d $(LIBDIR)/pkgconfig
336 @for l in $(PC); do \
337 echo "install -m 644 $$l $(LIBDIR)/pkgconfig"; \
338 install -m 644 $$l $(LIBDIR)/pkgconfig; \
339 done
340
341 install_lib: install_lib_shared install_lib_static install_lib_pc
342
343 install_doc_html:
344 install -d $(DATADIR)/doc/jemalloc$(install_suffix)
345 @for d in $(DOCS_HTML); do \
346 echo "install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
347 install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
348 done
349
350 install_doc_man:
351 install -d $(MANDIR)/man3
352 @for d in $(DOCS_MAN3); do \
353 echo "install -m 644 $$d $(MANDIR)/man3"; \
354 install -m 644 $$d $(MANDIR)/man3; \
355 done
356
357 install_doc: install_doc_html install_doc_man
358
359 install: install_bin install_include install_lib install_doc
360
361 tests_unit: $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%$(EXE))
362 tests_integration: $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%$(EXE))
363 tests_stress: $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%$(EXE))
364 tests: tests_unit tests_integration tests_stress
365
366 check_unit_dir:
367 @mkdir -p $(objroot)test/unit
368 check_integration_dir:
369 @mkdir -p $(objroot)test/integration
370 stress_dir:
371 @mkdir -p $(objroot)test/stress
372 check_dir: check_unit_dir check_integration_dir
373
374 check_unit: tests_unit check_unit_dir
375 $(MALLOC_CONF)="purge:ratio" $(SHELL) $(objroot)test/test.sh $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%)
376 $(MALLOC_CONF)="purge:decay" $(SHELL) $(objroot)test/test.sh $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%)
377 check_integration_prof: tests_integration check_integration_dir
378 ifeq ($(enable_prof), 1)
379 $(MALLOC_CONF)="prof:true" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%)
380 $(MALLOC_CONF)="prof:true,prof_active:false" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%)
381 endif
382 check_integration_decay: tests_integration check_integration_dir
383 $(MALLOC_CONF)="purge:decay,decay_time:-1" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%)
384 $(MALLOC_CONF)="purge:decay,decay_time:0" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%)
385 $(MALLOC_CONF)="purge:decay" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%)
386 check_integration: tests_integration check_integration_dir
387 $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%)
388 stress: tests_stress stress_dir
389 $(SHELL) $(objroot)test/test.sh $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%)
390 check: check_unit check_integration check_integration_decay check_integration_prof
391
392 ifeq ($(enable_code_coverage), 1)
393 coverage_unit: check_unit
394 $(SHELL) $(srcroot)coverage.sh $(srcroot)src jet $(C_JET_OBJS)
395 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src unit $(C_TESTLIB_UNIT_OBJS)
396 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/unit unit $(TESTS_UNIT_OBJS)
397
398 coverage_integration: check_integration
399 $(SHELL) $(srcroot)coverage.sh $(srcroot)src pic $(C_PIC_OBJS)
400 $(SHELL) $(srcroot)coverage.sh $(srcroot)src integration $(C_UTIL_INTEGRATION_OBJS)
401 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src integration $(C_TESTLIB_INTEGRATION_OBJS)
402 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/integration integration $(TESTS_INTEGRATION_OBJS)
403
404 coverage_stress: stress
405 $(SHELL) $(srcroot)coverage.sh $(srcroot)src pic $(C_PIC_OBJS)
406 $(SHELL) $(srcroot)coverage.sh $(srcroot)src jet $(C_JET_OBJS)
407 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src stress $(C_TESTLIB_STRESS_OBJS)
408 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/stress stress $(TESTS_STRESS_OBJS)
409
410 coverage: check
411 $(SHELL) $(srcroot)coverage.sh $(srcroot)src pic $(C_PIC_OBJS)
412 $(SHELL) $(srcroot)coverage.sh $(srcroot)src jet $(C_JET_OBJS)
413 $(SHELL) $(srcroot)coverage.sh $(srcroot)src integration $(C_UTIL_INTEGRATION_OBJS)
414 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src unit $(C_TESTLIB_UNIT_OBJS)
415 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src integration $(C_TESTLIB_INTEGRATION_OBJS)
416 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src stress $(C_TESTLIB_STRESS_OBJS)
417 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/unit unit $(TESTS_UNIT_OBJS) $(TESTS_UNIT_AUX_OBJS)
418 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/integration integration $(TESTS_INTEGRATION_OBJS)
419 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/stress integration $(TESTS_STRESS_OBJS)
420 endif
421
422 clean:
423 rm -f $(C_OBJS)
424 rm -f $(C_PIC_OBJS)
425 rm -f $(C_JET_OBJS)
426 rm -f $(C_TESTLIB_OBJS)
427 rm -f $(C_OBJS:%.$(O)=%.d)
428 rm -f $(C_OBJS:%.$(O)=%.gcda)
429 rm -f $(C_OBJS:%.$(O)=%.gcno)
430 rm -f $(C_PIC_OBJS:%.$(O)=%.d)
431 rm -f $(C_PIC_OBJS:%.$(O)=%.gcda)
432 rm -f $(C_PIC_OBJS:%.$(O)=%.gcno)
433 rm -f $(C_JET_OBJS:%.$(O)=%.d)
434 rm -f $(C_JET_OBJS:%.$(O)=%.gcda)
435 rm -f $(C_JET_OBJS:%.$(O)=%.gcno)
436 rm -f $(C_TESTLIB_OBJS:%.$(O)=%.d)
437 rm -f $(C_TESTLIB_OBJS:%.$(O)=%.gcda)
438 rm -f $(C_TESTLIB_OBJS:%.$(O)=%.gcno)
439 rm -f $(TESTS_OBJS:%.$(O)=%$(EXE))
440 rm -f $(TESTS_OBJS)
441 rm -f $(TESTS_OBJS:%.$(O)=%.d)
442 rm -f $(TESTS_OBJS:%.$(O)=%.gcda)
443 rm -f $(TESTS_OBJS:%.$(O)=%.gcno)
444 rm -f $(TESTS_OBJS:%.$(O)=%.out)
445 rm -f $(DSOS) $(STATIC_LIBS)
446 rm -f $(objroot)*.gcov.*
447
448 distclean: clean
449 rm -f $(objroot)bin/jemalloc-config
450 rm -f $(objroot)bin/jemalloc.sh
451 rm -f $(objroot)bin/jeprof
452 rm -f $(objroot)config.log
453 rm -f $(objroot)config.status
454 rm -f $(objroot)config.stamp
455 rm -f $(cfghdrs_out)
456 rm -f $(cfgoutputs_out)
457
458 relclean: distclean
459 rm -f $(objroot)configure
460 rm -f $(objroot)VERSION
461 rm -f $(DOCS_HTML)
462 rm -f $(DOCS_MAN3)
463
464 #===============================================================================
465 # Re-configuration rules.
466
467 ifeq ($(enable_autogen), 1)
468 $(srcroot)configure : $(srcroot)configure.ac
469 cd ./$(srcroot) && $(AUTOCONF)
470
471 $(objroot)config.status : $(srcroot)configure
472 ./$(objroot)config.status --recheck
473
474 $(srcroot)config.stamp.in : $(srcroot)configure.ac
475 echo stamp > $(srcroot)config.stamp.in
476
477 $(objroot)config.stamp : $(cfgoutputs_in) $(cfghdrs_in) $(srcroot)configure
478 ./$(objroot)config.status
479 @touch $@
480
481 # There must be some action in order for make to re-read Makefile when it is
482 # out of date.
483 $(cfgoutputs_out) $(cfghdrs_out) : $(objroot)config.stamp
484 @true
485 endif