2
0

Makefile.in 16 KB

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