Makefile.am 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
  2. #
  3. # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  4. # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
  5. #
  6. # Permission is hereby granted to use or copy this program
  7. # for any purpose, provided the above notices are retained on all copies.
  8. # Permission to modify the code and to distribute modified code is granted,
  9. # provided the above notices are retained, and a notice that the code was
  10. # modified is included with the above copyright notice.
  11. ## Process this file with automake to produce Makefile.in.
  12. # Info (current:revision:age) for the Libtool versioning system.
  13. # These numbers should be updated at most once just before the release,
  14. # and, optionally, at most once during the development (after the release).
  15. LIBGC_VER_INFO = 6:1:5
  16. LIBGCCPP_VER_INFO = 6:0:5
  17. ## FIXME: `make distcheck' in this directory will not currently work.
  18. ## This is most likely to the explicit flags passed to submakes.
  19. # We currently use the source files directly from libatomic_ops, if we
  20. # use the internal version.
  21. # Thus there seems to be no real reason to recursively build in the
  22. # libatomic_ops directory.
  23. SUBDIRS =
  24. ACLOCAL_AMFLAGS = -I m4
  25. AM_CPPFLAGS = \
  26. -I$(top_builddir)/include -I$(top_srcdir)/include \
  27. $(ATOMIC_OPS_CFLAGS)
  28. ## Initialize variables so that we can declare files locally.
  29. EXTRA_DIST =
  30. lib_LTLIBRARIES =
  31. include_HEADERS =
  32. pkginclude_HEADERS =
  33. dist_noinst_HEADERS =
  34. check_PROGRAMS =
  35. check_LTLIBRARIES =
  36. TESTS =
  37. pkgconfigdir = $(libdir)/pkgconfig
  38. pkgconfig_DATA = bdw-gc.pc
  39. # C Library
  40. # ---------
  41. lib_LTLIBRARIES += libgc.la
  42. if SINGLE_GC_OBJ
  43. libgc_la_SOURCES = extra/gc.c
  44. if PTHREAD_START_STANDALONE
  45. AM_CPPFLAGS += -DGC_PTHREAD_START_STANDALONE
  46. libgc_la_SOURCES += pthread_start.c
  47. endif
  48. else
  49. EXTRA_DIST += extra/gc.c
  50. libgc_la_SOURCES = \
  51. allchblk.c alloc.c blacklst.c dbg_mlc.c \
  52. dyn_load.c finalize.c gc_dlopen.c headers.c \
  53. mach_dep.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
  54. obj_map.c os_dep.c ptr_chck.c reclaim.c specific.c typd_mlc.c
  55. # C Library: Architecture Dependent
  56. # ---------------------------------
  57. if THREADS
  58. libgc_la_SOURCES += pthread_start.c pthread_support.c
  59. if THREAD_LOCAL_ALLOC
  60. libgc_la_SOURCES += thread_local_alloc.c
  61. endif
  62. if WIN32_THREADS
  63. libgc_la_SOURCES += win32_threads.c
  64. else
  65. if DARWIN_THREADS
  66. libgc_la_SOURCES += darwin_stop_world.c
  67. else
  68. libgc_la_SOURCES += pthread_stop_world.c
  69. endif
  70. endif
  71. endif
  72. if MAKE_BACK_GRAPH
  73. libgc_la_SOURCES += backgraph.c
  74. endif
  75. if CHECKSUMS
  76. libgc_la_SOURCES += checksums.c
  77. endif
  78. if ENABLE_GCJ_SUPPORT
  79. libgc_la_SOURCES += gcj_mlc.c
  80. endif
  81. if ENABLE_DISCLAIM
  82. libgc_la_SOURCES += fnlz_mlc.c
  83. endif
  84. ## End of !SINGLE_GC_OBJ
  85. endif
  86. if USE_INTERNAL_LIBATOMIC_OPS
  87. nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c
  88. if NEED_ATOMIC_OPS_ASM
  89. nodist_libgc_la_SOURCES += libatomic_ops/src/atomic_ops_sysdeps.S
  90. endif
  91. endif
  92. # Include THREADDLLIBS here to ensure that the correct versions of
  93. # linuxthread semaphore (and clock_gettime) functions get linked:
  94. libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS)
  95. libgc_la_DEPENDENCIES = @addobjs@
  96. libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info $(LIBGC_VER_INFO) \
  97. -no-undefined
  98. EXTRA_libgc_la_SOURCES = ia64_save_regs_in_stack.s sparc_mach_dep.S \
  99. sparc_netbsd_mach_dep.s
  100. if CPLUSPLUS
  101. # C++ Interface
  102. # -------------
  103. lib_LTLIBRARIES += libgccpp.la
  104. libgccpp_la_SOURCES = gc_badalc.cc gc_cpp.cc
  105. libgccpp_la_LIBADD = libgc.la
  106. libgccpp_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
  107. if GC_TBA_LIBRARY
  108. # The same as libgccpp but contains only gc_badalc.o.
  109. lib_LTLIBRARIES += libgctba.la
  110. libgctba_la_SOURCES = gc_badalc.cc
  111. libgctba_la_LIBADD = libgc.la
  112. # Set the same version as for libgccpp.
  113. libgctba_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
  114. endif
  115. endif
  116. EXTRA_DIST += gc_badalc.cpp gc_cpp.cpp
  117. # Misc
  118. # ----
  119. AM_CXXFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
  120. AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
  121. CFLAGS += $(CFLAGS_EXTRA)
  122. CXXFLAGS += $(CFLAGS_EXTRA)
  123. ## FIXME: relies on internal code generated by automake.
  124. ## FIXME: ./configure --enable-dependency-tracking should be used
  125. ## FIXME: we shouldn't have to do this, but automake forces us to.
  126. ## We use -Wp,-P to strip #line directives. Irix `as' chokes on
  127. ## these.
  128. if ASM_WITH_CPP_UNSUPPORTED
  129. ASM_CPP_OPTIONS =
  130. else
  131. ASM_CPP_OPTIONS = -Wp,-P -x assembler-with-cpp
  132. endif
  133. .s.lo:
  134. $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
  135. .S.lo:
  136. $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
  137. ## We need to add DEFS to assembler flags
  138. ## :FIXME: what if assembler does not accept -D... ?
  139. ## (use Autoconf to prepare ASDEFS?)
  140. CCASFLAGS += $(DEFS)
  141. # headers which are not installed
  142. # (see include/include.am for more)
  143. #
  144. # other makefiles
  145. EXTRA_DIST += Makefile.direct NT_MAKEFILE WCC_MAKEFILE digimars.mak \
  146. autogen.sh CMakeLists.txt Config.cmake.in
  147. # files used by makefiles other than Makefile.am
  148. #
  149. EXTRA_DIST += tools/if_mach.c tools/if_not_there.c tools/setjmp_t.c \
  150. tools/threadlibs.c extra/MacOS.c extra/AmigaOS.c \
  151. extra/symbian/global_end.cpp extra/symbian/global_start.cpp \
  152. extra/symbian/init_global_static_roots.cpp extra/symbian.cpp \
  153. extra/pcr_interface.c extra/real_malloc.c \
  154. extra/Mac_files/datastart.c extra/Mac_files/dataend.c \
  155. extra/Mac_files/MacOS_config.h extra/msvc_dbg.c tools/callprocs.sh
  156. #
  157. # :GOTCHA: GNU make rule for making .s out of .S is flawed,
  158. # it will not remove dest if building fails
  159. .S.s:
  160. if $(CPP) $< >$@ ; then :; else rm -f $@; fi
  161. include include/include.am
  162. include cord/cord.am
  163. include tests/tests.am
  164. ## Putting these at the top causes cord to be built first, and not find
  165. ## libgc.a on HP/UX. There may be a better fix.
  166. # Installed documentation.
  167. if ENABLE_DOCS
  168. dist_doc_DATA = \
  169. AUTHORS \
  170. LICENSE \
  171. README.md \
  172. doc/platforms/README.aix \
  173. doc/platforms/README.amiga \
  174. doc/platforms/README.arm_cross \
  175. doc/platforms/README.darwin \
  176. doc/platforms/README.dgux386 \
  177. doc/platforms/README.emscripten \
  178. doc/platforms/README.ews4800 \
  179. doc/platforms/README.hp \
  180. doc/platforms/README.linux \
  181. doc/platforms/README.mac \
  182. doc/platforms/README.os2 \
  183. doc/platforms/README.sgi \
  184. doc/platforms/README.solaris2 \
  185. doc/platforms/README.symbian \
  186. doc/platforms/README.uts \
  187. doc/platforms/README.win32 \
  188. doc/platforms/README.win64 \
  189. doc/README.autoconf \
  190. doc/README.cmake \
  191. doc/README.cords \
  192. doc/README.environment \
  193. doc/README.macros \
  194. doc/debugging.md \
  195. doc/finalization.md \
  196. doc/gcdescr.md \
  197. doc/gcinterface.md \
  198. doc/leak.md \
  199. doc/overview.md \
  200. doc/porting.md \
  201. doc/scale.md \
  202. doc/simple_example.md \
  203. doc/tree.md
  204. dist_man3_MANS = gc.man
  205. endif
  206. # A dummy target for mono build.
  207. test-bundle: