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 := @cfghdrs_in@ 46cfghdrs_out := @cfghdrs_out@ 47cfgoutputs_in := @cfgoutputs_in@ 48cfgoutputs_out := @cfgoutputs_out@ 49enable_autogen := @enable_autogen@ 50enable_code_coverage := @enable_code_coverage@ 51enable_experimental := @enable_experimental@ 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. 76BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh 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 \ 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 86ifeq ($(enable_zone_allocator), 1) 87C_SRCS += $(srcroot)src/zone.c 88endif 89ifeq ($(IMPORTLIB),$(SO)) 90STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A) 91endif 92ifdef PIC_CFLAGS 93STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A) 94else 95STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A) 96endif 97DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV) 98ifneq ($(SOREV),$(SO)) 99DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO) 100endif 101MAN3 := $(objroot)doc/jemalloc$(install_suffix).3 102DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml 103DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(srcroot)%.html) 104DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(srcroot)%.3) 105DOCS := $(DOCS_HTML) $(DOCS_MAN3) 106C_TESTLIB_SRCS := $(srcroot)test/src/math.c $(srcroot)test/src/mtx.c \ 107 $(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \ 108 $(srcroot)test/src/thd.c 109C_UTIL_INTEGRATION_SRCS := $(srcroot)src/util.c 110TESTS_UNIT := $(srcroot)test/unit/bitmap.c \ 111 $(srcroot)test/unit/ckh.c \ 112 $(srcroot)test/unit/hash.c \ 113 $(srcroot)test/unit/junk.c \ 114 $(srcroot)test/unit/mallctl.c \ 115 $(srcroot)test/unit/math.c \ 116 $(srcroot)test/unit/mq.c \ 117 $(srcroot)test/unit/mtx.c \ 118 $(srcroot)test/unit/prof_accum.c \ 119 $(srcroot)test/unit/prof_gdump.c \ 120 $(srcroot)test/unit/prof_idump.c \ 121 $(srcroot)test/unit/ql.c \ 122 $(srcroot)test/unit/qr.c \ 123 $(srcroot)test/unit/quarantine.c \ 124 $(srcroot)test/unit/rb.c \ 125 $(srcroot)test/unit/rtree.c \ 126 $(srcroot)test/unit/SFMT.c \ 127 $(srcroot)test/unit/stats.c \ 128 $(srcroot)test/unit/tsd.c \ 129 $(srcroot)test/unit/util.c \ 130 $(srcroot)test/unit/zero.c 131TESTS_UNIT_AUX := $(srcroot)test/unit/prof_accum_a.c \ 132 $(srcroot)test/unit/prof_accum_b.c 133TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \ 134 $(srcroot)test/integration/allocated.c \ 135 $(srcroot)test/integration/mallocx.c \ 136 $(srcroot)test/integration/mremap.c \ 137 $(srcroot)test/integration/posix_memalign.c \ 138 $(srcroot)test/integration/rallocx.c \ 139 $(srcroot)test/integration/thread_arena.c \ 140 $(srcroot)test/integration/thread_tcache_enabled.c \ 141 $(srcroot)test/integration/xallocx.c 142ifeq ($(enable_experimental), 1) 143TESTS_INTEGRATION += $(srcroot)test/integration/allocm.c \ 144 $(srcroot)test/integration/MALLOCX_ARENA.c \ 145 $(srcroot)test/integration/rallocm.c 146endif 147TESTS_STRESS := 148TESTS := $(TESTS_UNIT) $(TESTS_INTEGRATION) $(TESTS_STRESS) 149 150C_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.$(O)) 151C_PIC_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.pic.$(O)) 152C_JET_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.$(O)) 153C_TESTLIB_UNIT_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.unit.$(O)) 154C_TESTLIB_INTEGRATION_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O)) 155C_UTIL_INTEGRATION_OBJS := $(C_UTIL_INTEGRATION_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O)) 156C_TESTLIB_STRESS_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.stress.$(O)) 157C_TESTLIB_OBJS := $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(C_TESTLIB_STRESS_OBJS) 158 159TESTS_UNIT_OBJS := $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%.$(O)) 160TESTS_UNIT_AUX_OBJS := $(TESTS_UNIT_AUX:$(srcroot)%.c=$(objroot)%.$(O)) 161TESTS_INTEGRATION_OBJS := $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%.$(O)) 162TESTS_STRESS_OBJS := $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%.$(O)) 163TESTS_OBJS := $(TESTS_UNIT_OBJS) $(TESTS_UNIT_AUX_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_STRESS_OBJS) 164 165.PHONY: all dist build_doc_html build_doc_man build_doc 166.PHONY: install_bin install_include install_lib 167.PHONY: install_doc_html install_doc_man install_doc install 168.PHONY: tests check clean distclean relclean 169 170.SECONDARY : $(TESTS_OBJS) 171 172# Default target. 173all: build_lib 174 175dist: build_doc 176 177$(srcroot)doc/%.html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl 178 $(XSLTPROC) -o $@ $(objroot)doc/html.xsl $< 179 180$(srcroot)doc/%.3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl 181 $(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $< 182 183build_doc_html: $(DOCS_HTML) 184build_doc_man: $(DOCS_MAN3) 185build_doc: $(DOCS) 186 187# 188# Include generated dependency files. 189# 190ifdef CC_MM 191-include $(C_OBJS:%.$(O)=%.d) 192-include $(C_PIC_OBJS:%.$(O)=%.d) 193-include $(C_JET_OBJS:%.$(O)=%.d) 194-include $(C_TESTLIB_OBJS:%.$(O)=%.d) 195-include $(TESTS_OBJS:%.$(O)=%.d) 196endif 197 198$(C_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c 199$(C_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c 200$(C_PIC_OBJS): CFLAGS += $(PIC_CFLAGS) 201$(C_JET_OBJS): $(objroot)src/%.jet.$(O): $(srcroot)src/%.c 202$(C_JET_OBJS): CFLAGS += -DJEMALLOC_JET 203$(C_TESTLIB_UNIT_OBJS): $(objroot)test/src/%.unit.$(O): $(srcroot)test/src/%.c 204$(C_TESTLIB_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST 205$(C_TESTLIB_INTEGRATION_OBJS): $(objroot)test/src/%.integration.$(O): $(srcroot)test/src/%.c 206$(C_TESTLIB_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST 207$(C_UTIL_INTEGRATION_OBJS): $(objroot)src/%.integration.$(O): $(srcroot)src/%.c 208$(C_TESTLIB_STRESS_OBJS): $(objroot)test/src/%.stress.$(O): $(srcroot)test/src/%.c 209$(C_TESTLIB_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST -DJEMALLOC_STRESS_TESTLIB 210$(C_TESTLIB_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include 211$(TESTS_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST 212$(TESTS_UNIT_AUX_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST 213define make-unit-link-dep 214$(1): TESTS_UNIT_LINK_OBJS += $(2) 215$(1): $(2) 216endef 217$(foreach test, $(TESTS_UNIT:$(srcroot)test/unit/%.c=$(objroot)test/unit/%$(EXE)), $(eval $(call make-unit-link-dep,$(test),$(filter $(test:%=%_a.$(O)) $(test:%=%_b.$(O)),$(TESTS_UNIT_AUX_OBJS))))) 218$(TESTS_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST 219$(TESTS_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST 220$(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c 221$(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include 222ifneq ($(IMPORTLIB),$(SO)) 223$(C_OBJS): CPPFLAGS += -DDLLEXPORT 224endif 225 226ifndef CC_MM 227# Dependencies. 228HEADER_DIRS = $(srcroot)include/jemalloc/internal \ 229 $(objroot)include/jemalloc $(objroot)include/jemalloc/internal 230HEADERS = $(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h)) 231$(C_OBJS) $(C_PIC_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): $(HEADERS) 232$(TESTS_OBJS): $(objroot)test/unit/jemalloc_test.h 233endif 234 235$(C_OBJS) $(C_PIC_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): %.$(O): 236 @mkdir -p $(@D) 237 $(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $< 238ifdef CC_MM 239 @$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $< 240endif 241 242ifneq ($(SOREV),$(SO)) 243%.$(SO) : %.$(SOREV) 244 @mkdir -p $(@D) 245 ln -sf $(<F) $@ 246endif 247 248$(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(C_PIC_OBJS),$(C_OBJS)) 249 @mkdir -p $(@D) 250 $(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS) 251 252$(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(C_PIC_OBJS) 253$(objroot)lib/$(LIBJEMALLOC).$(A) : $(C_OBJS) 254$(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(C_OBJS) 255 256$(STATIC_LIBS): 257 @mkdir -p $(@D) 258 $(AR) $(ARFLAGS)@AROUT@ $+ 259 260$(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(TESTS_UNIT_LINK_OBJS) $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS) 261 @mkdir -p $(@D) 262 $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS) 263 264$(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) 265 @mkdir -p $(@D) 266 $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(filter -lpthread,$(LIBS))) -lm $(EXTRA_LDFLAGS) 267 268$(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) 269 @mkdir -p $(@D) 270 $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS) 271 272build_lib_shared: $(DSOS) 273build_lib_static: $(STATIC_LIBS) 274build_lib: build_lib_shared build_lib_static 275 276install_bin: 277 install -d $(BINDIR) 278 @for b in $(BINS); do \ 279 echo "install -m 755 $$b $(BINDIR)"; \ 280 install -m 755 $$b $(BINDIR); \ 281done 282 283install_include: 284 install -d $(INCLUDEDIR)/jemalloc 285 @for h in $(C_HDRS); do \ 286 echo "install -m 644 $$h $(INCLUDEDIR)/jemalloc"; \ 287 install -m 644 $$h $(INCLUDEDIR)/jemalloc; \ 288done 289 290install_lib_shared: $(DSOS) 291 install -d $(LIBDIR) 292 install -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR) 293ifneq ($(SOREV),$(SO)) 294 ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO) 295endif 296 297install_lib_static: $(STATIC_LIBS) 298 install -d $(LIBDIR) 299 @for l in $(STATIC_LIBS); do \ 300 echo "install -m 755 $$l $(LIBDIR)"; \ 301 install -m 755 $$l $(LIBDIR); \ 302done 303 304install_lib: install_lib_shared install_lib_static 305 306install_doc_html: 307 install -d $(DATADIR)/doc/jemalloc$(install_suffix) 308 @for d in $(DOCS_HTML); do \ 309 echo "install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \ 310 install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \ 311done 312 313install_doc_man: 314 install -d $(MANDIR)/man3 315 @for d in $(DOCS_MAN3); do \ 316 echo "install -m 644 $$d $(MANDIR)/man3"; \ 317 install -m 644 $$d $(MANDIR)/man3; \ 318done 319 320install_doc: install_doc_html install_doc_man 321 322install: install_bin install_include install_lib install_doc 323 324tests_unit: $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%$(EXE)) 325tests_integration: $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%$(EXE)) 326tests_stress: $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%$(EXE)) 327tests: tests_unit tests_integration tests_stress 328 329check_unit_dir: 330 @mkdir -p $(objroot)test/unit 331check_integration_dir: 332 @mkdir -p $(objroot)test/integration 333check_stress_dir: 334 @mkdir -p $(objroot)test/stress 335check_dir: check_unit_dir check_integration_dir check_stress_dir 336 337check_unit: tests_unit check_unit_dir 338 $(SHELL) $(objroot)test/test.sh $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%) 339check_integration: tests_integration check_integration_dir 340 $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) 341check_stress: tests_stress check_stress_dir 342 $(SHELL) $(objroot)test/test.sh $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%) 343check: tests check_dir 344 $(SHELL) $(objroot)test/test.sh $(TESTS:$(srcroot)%.c=$(objroot)%) 345 346ifeq ($(enable_code_coverage), 1) 347coverage_unit: check_unit 348 $(SHELL) $(srcroot)coverage.sh $(srcroot)src jet $(C_JET_OBJS) 349 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src unit $(C_TESTLIB_UNIT_OBJS) 350 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/unit unit $(TESTS_UNIT_OBJS) 351 352coverage_integration: check_integration 353 $(SHELL) $(srcroot)coverage.sh $(srcroot)src pic $(C_PIC_OBJS) 354 $(SHELL) $(srcroot)coverage.sh $(srcroot)src integration $(C_UTIL_INTEGRATION_OBJS) 355 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src integration $(C_TESTLIB_INTEGRATION_OBJS) 356 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/integration integration $(TESTS_INTEGRATION_OBJS) 357 358coverage_stress: check_stress 359 $(SHELL) $(srcroot)coverage.sh $(srcroot)src pic $(C_PIC_OBJS) 360 $(SHELL) $(srcroot)coverage.sh $(srcroot)src jet $(C_JET_OBJS) 361 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src stress $(C_TESTLIB_STRESS_OBJS) 362 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/stress stress $(TESTS_STRESS_OBJS) 363 364coverage: check 365 $(SHELL) $(srcroot)coverage.sh $(srcroot)src pic $(C_PIC_OBJS) 366 $(SHELL) $(srcroot)coverage.sh $(srcroot)src jet $(C_JET_OBJS) 367 $(SHELL) $(srcroot)coverage.sh $(srcroot)src integration $(C_UTIL_INTEGRATION_OBJS) 368 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src unit $(C_TESTLIB_UNIT_OBJS) 369 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src integration $(C_TESTLIB_INTEGRATION_OBJS) 370 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/src stress $(C_TESTLIB_STRESS_OBJS) 371 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/unit unit $(TESTS_UNIT_OBJS) $(TESTS_UNIT_AUX_OBJS) 372 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/integration integration $(TESTS_INTEGRATION_OBJS) 373 $(SHELL) $(srcroot)coverage.sh $(srcroot)test/stress integration $(TESTS_STRESS_OBJS) 374endif 375 376clean: 377 rm -f $(C_OBJS) 378 rm -f $(C_PIC_OBJS) 379 rm -f $(C_JET_OBJS) 380 rm -f $(C_TESTLIB_OBJS) 381 rm -f $(C_OBJS:%.$(O)=%.d) 382 rm -f $(C_OBJS:%.$(O)=%.gcda) 383 rm -f $(C_OBJS:%.$(O)=%.gcno) 384 rm -f $(C_PIC_OBJS:%.$(O)=%.d) 385 rm -f $(C_PIC_OBJS:%.$(O)=%.gcda) 386 rm -f $(C_PIC_OBJS:%.$(O)=%.gcno) 387 rm -f $(C_JET_OBJS:%.$(O)=%.d) 388 rm -f $(C_JET_OBJS:%.$(O)=%.gcda) 389 rm -f $(C_JET_OBJS:%.$(O)=%.gcno) 390 rm -f $(C_TESTLIB_OBJS:%.$(O)=%.d) 391 rm -f $(C_TESTLIB_OBJS:%.$(O)=%.gcda) 392 rm -f $(C_TESTLIB_OBJS:%.$(O)=%.gcno) 393 rm -f $(TESTS_OBJS:%.$(O)=%$(EXE)) 394 rm -f $(TESTS_OBJS) 395 rm -f $(TESTS_OBJS:%.$(O)=%.d) 396 rm -f $(TESTS_OBJS:%.$(O)=%.gcda) 397 rm -f $(TESTS_OBJS:%.$(O)=%.gcno) 398 rm -f $(TESTS_OBJS:%.$(O)=%.out) 399 rm -f $(DSOS) $(STATIC_LIBS) 400 rm -f $(objroot)*.gcov.* 401 402distclean: clean 403 rm -rf $(objroot)autom4te.cache 404 rm -f $(objroot)bin/jemalloc.sh 405 rm -f $(objroot)config.log 406 rm -f $(objroot)config.status 407 rm -f $(objroot)config.stamp 408 rm -f $(cfghdrs_out) 409 rm -f $(cfgoutputs_out) 410 411relclean: distclean 412 rm -f $(objroot)configure 413 rm -f $(srcroot)VERSION 414 rm -f $(DOCS_HTML) 415 rm -f $(DOCS_MAN3) 416 417#=============================================================================== 418# Re-configuration rules. 419 420ifeq ($(enable_autogen), 1) 421$(srcroot)configure : $(srcroot)configure.ac 422 cd ./$(srcroot) && $(AUTOCONF) 423 424$(objroot)config.status : $(srcroot)configure 425 ./$(objroot)config.status --recheck 426 427$(srcroot)config.stamp.in : $(srcroot)configure.ac 428 echo stamp > $(srcroot)config.stamp.in 429 430$(objroot)config.stamp : $(cfgoutputs_in) $(cfghdrs_in) $(srcroot)configure 431 ./$(objroot)config.status 432 @touch $@ 433 434# There must be some action in order for make to re-read Makefile when it is 435# out of date. 436$(cfgoutputs_out) $(cfghdrs_out) : $(objroot)config.stamp 437 @true 438endif 439