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