/src/racket/gc/Makefile.in

http://github.com/gmarceau/PLT · Autoconf · 848 lines · 372 code · 121 blank · 355 comment · 6 complexity · 0ea6f713687f43bcad024cc8662bab86 MD5 · raw file

  1. # This is the original manually generated Makefile. It may still be used
  2. # to build the collector.
  3. #
  4. # Primary targets:
  5. # gc.a - builds basic library
  6. # c++ - adds C++ interface to library
  7. # cords - adds cords (heavyweight strings) to library
  8. # test - prints porting information, then builds basic version of gc.a,
  9. # and runs some tests of collector and cords. Does not add cords or
  10. # c++ interface to gc.a
  11. # cord/de - builds dumb editor based on cords.
  12. ABI_FLAG=
  13. # ABI_FLAG should be the cc flag that specifies the ABI. On most
  14. # platforms this will be the empty string. Possible values:
  15. # +DD64 for 64-bit executable on HP/UX.
  16. # -n32, -n64, -o32 for SGI/MIPS ABIs.
  17. AS_ABI_FLAG=$(ABI_FLAG)
  18. # ABI flag for assembler. On HP/UX this is +A64 for 64 bit
  19. # executables.
  20. CC= @CC@ $(ABI_FLAG)
  21. CXX= @CXX@ $(ABI_FLAG)
  22. AS= @AS@ $(ABI_FLAG)
  23. # The above doesn't work with gas, which doesn't run cpp.
  24. # Define AS as `gcc -c -x assembler-with-cpp' instead.
  25. # Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
  26. # if you use something other than the default ABI on your machine.
  27. # Redefining srcdir allows object code for the nonPCR version of the collector
  28. # to be generated in different directories.
  29. srcdir= @srcdir@
  30. VPATH= $(srcdir)
  31. # Atomic_ops installation directory. If this doesn't exist, we create
  32. # it from the included libatomic_ops distribution.
  33. AO_SRC_DIR=$(srcdir)/libatomic_ops
  34. AO_INSTALL_DIR=$(srcdir)/libatomic_ops
  35. # for version.mak:
  36. mainsrcdir = @srcdir@/../..
  37. @INCLUDEDEP@ @srcdir@/../version.mak
  38. # compiler options; mainly used to allow importing options
  39. OPTIONS=@OPTIONS@ @CGCOPTIONS@
  40. BASEFLAGS= -I$(srcdir)/include -I$(AO_INSTALL_DIR)/src @CFLAGS@ @COMPFLAGS@ @PREFLAGS@
  41. CFLAGS= $(BASEFLAGS) @PROFFLAGS@ $(OPTIONS) -DNO_EXECUTE_PERMISSION -DSILENT -DNO_GETENV -DLARGE_CONFIG -DATOMIC_UNCOLLECTABLE -DINITIAL_MARK_STACK_SIZE=8192
  42. # To build the parallel collector on Linux, add to the above:
  43. # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
  44. # To build the thread-capable preload library that intercepts
  45. # malloc, add -DGC_USE_DLOPEN_WRAP -DREDIRECT_MALLOC=GC_malloc -fpic
  46. # To build the parallel collector in a static library on HP/UX,
  47. # add to the above:
  48. # -DGC_HPUX_THREADS -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
  49. # FIXME: PARALLEL_MARK currently broken on HP/UX.
  50. # To build the thread-safe collector on Tru64, add to the above:
  51. # -pthread -DGC_OSF1_THREADS
  52. # HOSTCC and HOSTCFLAGS are used to build executables that will be run as
  53. # part of the build process, i.e. on the build machine. These will usually
  54. # be the same as CC and CFLAGS, except in a cross-compilation environment.
  55. # Note that HOSTCFLAGS should include any -D flags that affect thread support.
  56. HOSTCC=@CC_FOR_BUILD@
  57. HOSTCFLAGS=$(BASEFLAGS)
  58. # For dynamic library builds, it may be necessary to add flags to generate
  59. # PIC code, e.g. -fPIC on Linux.
  60. # Setjmp_test may yield overly optimistic results when compiled
  61. # without optimization.
  62. # These define arguments influence the collector configuration:
  63. # -DFIND_LEAK causes GC_find_leak to be initially set.
  64. # This causes the collector to assume that all inaccessible
  65. # objects should have been explicitly deallocated, and reports exceptions.
  66. # Finalization and the test program are not usable in this mode.
  67. #
  68. # IMPORTANT: Any of the _THREADS options must normally also be defined in
  69. # the client before including gc.h. This redefines thread primitives to
  70. # invoke the GC_ versions instead. Alternatively, linker-based symbol
  71. # interception can be used on a few platforms.
  72. # -DGC_THREADS should set the appropriate one of the below macros,
  73. # except -DGC_WIN32_PTHREADS, which must be set explicitly.
  74. # -DGC_SOLARIS_PTHREADS enables support for Solaris pthreads.
  75. # (Clients should also define GC_SOLARIS_THREADS and then include
  76. # gc.h before performing thr_ or dl* or GC_ operations.)
  77. # Must also define -D_REENTRANT.
  78. # -DGC_IRIX_THREADS enables support for Irix pthreads. See README.irix.
  79. # -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
  80. # Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
  81. # -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads
  82. # or NPTL threads. See README.linux. -D_REENTRANT may also be required.
  83. # -DGC_OSF1_THREADS enables support for Tru64 pthreads.
  84. # -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
  85. # Appeared to run into some underlying thread problems.
  86. # -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
  87. # -DGC_AIX_THREADS enables support for IBM AIX threads.
  88. # -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
  89. # See README.DGUX386. (Probably has not been tested recently.)
  90. # -DGC_WIN32_THREADS enables support for win32 threads. That makes sense
  91. # for this Makefile only under Cygwin.
  92. # -DGC_WIN32_PTHREADS enables support for Ming32 pthreads. This cannot be
  93. # enabled automatically by GC_THREADS, which would assume Win32 native
  94. # threads.
  95. # -DPTW32_STATIC_LIB causes the static version of the Mingw pthreads library
  96. # to be used. Requires -DGC_WIN32_PTHREADS.
  97. #
  98. # -DALL_INTERIOR_POINTERS allows all pointers to the interior
  99. # of objects to be recognized. (See gc_priv.h for consequences.)
  100. # Alternatively, GC_all_interior_pointers can be set at process
  101. # initialization time.
  102. # -DSMALL_CONFIG tries to tune the collector for small heap sizes,
  103. # usually causing it to use less space in such situations.
  104. # Incremental collection no longer works in this case.
  105. # -DLARGE_CONFIG tunes the collector for unusually large heaps.
  106. # Necessary for heaps larger than about 500 MB on most machines.
  107. # Recommended for heaps larger than about 64 MB.
  108. # -DDONT_ADD_BYTE_AT_END is meaningful only with -DALL_INTERIOR_POINTERS or
  109. # GC_all_interior_pointers = 1. Normally -DALL_INTERIOR_POINTERS
  110. # causes all objects to be padded so that pointers just past the end of
  111. # an object can be recognized. This can be expensive. (The padding
  112. # is normally more than one byte due to alignment constraints.)
  113. # -DDONT_ADD_BYTE_AT_END disables the padding.
  114. # -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
  115. # have execute permission, i.e. it may be impossible to execute
  116. # code from the heap. Currently this only affects the incremental
  117. # collector on UNIX machines. It may greatly improve its performance,
  118. # since this may avoid some expensive cache synchronization.
  119. # -DGC_NO_OPERATOR_NEW_ARRAY declares that the C++ compiler does not support
  120. # the new syntax "operator new[]" for allocating and deleting arrays.
  121. # See gc_cpp.h for details. No effect on the C part of the collector.
  122. # This is defined implicitly in a few environments. Must also be defined
  123. # by clients that use gc_cpp.h.
  124. # -DREDIRECT_MALLOC=X causes malloc to be defined as alias for X.
  125. # Unless the following macros are defined, realloc is also redirected
  126. # to GC_realloc, and free is redirected to GC_free.
  127. # Calloc and strdup are redefined in terms of the new malloc. X should
  128. # be either GC_malloc or GC_malloc_uncollectable, or
  129. # GC_debug_malloc_replacement. (The latter invokes GC_debug_malloc
  130. # with dummy source location information, but still results in
  131. # properly remembered call stacks on Linux/X86 and Solaris/SPARC.
  132. # It requires that the following two macros also be used.)
  133. # The former is occasionally useful for working around leaks in code
  134. # you don't want to (or can't) look at. It may not work for
  135. # existing code, but it often does. Neither works on all platforms,
  136. # since some ports use malloc or calloc to obtain system memory.
  137. # (Probably works for UNIX, and win32.) If you build with DBG_HDRS_ALL,
  138. # you should only use GC_debug_malloc_replacement as a malloc
  139. # replacement.
  140. # -DREDIRECT_REALLOC=X causes GC_realloc to be redirected to X.
  141. # The canonical use is -DREDIRECT_REALLOC=GC_debug_realloc_replacement,
  142. # together with -DREDIRECT_MALLOC=GC_debug_malloc_replacement to
  143. # generate leak reports with call stacks for both malloc and realloc.
  144. # This also requires the following:
  145. # -DREDIRECT_FREE=X causes free to be redirected to X. The
  146. # canonical use is -DREDIRECT_FREE=GC_debug_free.
  147. # -DIGNORE_FREE turns calls to free into a noop. Only useful with
  148. # -DREDIRECT_MALLOC.
  149. # -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
  150. # Reduces code size slightly at the expense of debuggability.
  151. # -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
  152. # order by specifying a nonstandard finalization mark procedure (see
  153. # finalize.c). Objects reachable from finalizable objects will be marked
  154. # in a separate postpass, and hence their memory won't be reclaimed.
  155. # Not recommended unless you are implementing a language that specifies
  156. # these semantics. Since 5.0, determines only the initial value
  157. # of GC_java_finalization variable.
  158. # -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
  159. # to explicit GC_invoke_finalizers() calls.
  160. # In 5.0 this became runtime adjustable, and this only determines the
  161. # initial value of GC_finalize_on_demand.
  162. # -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
  163. # This is useful if either the vendor malloc implementation is poor,
  164. # or if REDIRECT_MALLOC is used.
  165. # -DMARK_BIT_PER_GRANULE requests that a mark bit (or often byte)
  166. # be allocated for each allocation granule, as opposed to each object.
  167. # This often improves speed, possibly at some cost in space and/or
  168. # cache footprint. Normally it is best to let this decision be
  169. # made automatically depending on platform.
  170. # -DMARK_BIT_PER_OBJ requests that a mark bit be allocated for each
  171. # object instead of allocation granule. The opposiet of
  172. # MARK_BIT_PER_GRANULE.
  173. # -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
  174. # sets the heap block size. Each heap block is devoted to a single size and
  175. # kind of object. For the incremental collector it makes sense to match
  176. # the most likely page size. Otherwise large values result in more
  177. # fragmentation, but generally better performance for large heaps.
  178. # -DUSE_MMAP use MMAP instead of sbrk to get new memory.
  179. # Works for Solaris and Irix.
  180. # -DUSE_MUNMAP causes memory to be returned to the OS under the right
  181. # circumstances. This currently disables VM-based incremental collection.
  182. # This is currently experimental, and works only under some Unix,
  183. # Linux and Windows versions. Requires -DUSE_MMAP, even under Windows,
  184. # where USE_MMAP doesn't do anything.
  185. # -DMMAP_STACKS (for Solaris threads) Use mmap from /dev/zero rather than
  186. # GC_scratch_alloc() to get stack memory.
  187. # -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
  188. # the garbage collector detects a value that looks almost, but not quite,
  189. # like a pointer, print both the address containing the value, and the
  190. # value of the near-bogus-pointer. Can be used to identifiy regions of
  191. # memory that are likely to contribute misidentified pointers.
  192. # -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
  193. # for objects allocated with the debugging allocator. If all objects
  194. # through GC_MALLOC with GC_DEBUG defined, this allows the client
  195. # to determine how particular or randomly chosen objects are reachable
  196. # for debugging/profiling purposes. The gc_backptr.h interface is
  197. # implemented only if this is defined.
  198. # -DGC_ASSERTIONS Enable some internal GC assertion checking. Currently
  199. # this facility is only used in a few places. It is intended primarily
  200. # for debugging of the garbage collector itself, but could also
  201. # -DDBG_HDRS_ALL Make sure that all objects have debug headers. Increases
  202. # the reliability (from 99.9999% to 100% mod. bugs) of some of the debugging
  203. # code (especially KEEP_BACK_PTRS). Makes -DSHORT_DBG_HDRS possible.
  204. # Assumes that all client allocation is done through debugging
  205. # allocators.
  206. # -DSHORT_DBG_HDRS Assume that all objects have debug headers. Shorten
  207. # the headers to minimize object size, at the expense of checking for
  208. # writes past the end of an object. This is intended for environments
  209. # in which most client code is written in a "safe" language, such as
  210. # Scheme or Java. Assumes that all client allocation is done using
  211. # the GC_debug_ functions, or through the macros that expand to these,
  212. # or by redirecting malloc to GC_debug_malloc_replacement.
  213. # (Also eliminates the field for the requested object size.)
  214. # -DSAVE_CALL_COUNT=<n> Set the number of call frames saved with objects
  215. # allocated through the debugging interface. Affects the amount of
  216. # information generated in leak reports. Only matters on platforms
  217. # on which we can quickly generate call stacks, currently Linux/(X86 & SPARC)
  218. # and Solaris/SPARC and platforms that provide execinfo.h.
  219. # Default is zero. On X86, client
  220. # code should NOT be compiled with -fomit-frame-pointer.
  221. # -DSAVE_CALL_NARGS=<n> Set the number of functions arguments to be
  222. # saved with each call frame. Default is zero. Ignored if we
  223. # don't know how to retrieve arguments on the platform.
  224. # -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
  225. # altered stubborn objects, at substantial performance cost.
  226. # Use only for debugging of the incremental collector.
  227. # -DGC_GCJ_SUPPORT includes support for gcj (and possibly other systems
  228. # that include a pointer to a type descriptor in each allocated object).
  229. # Building this way requires an ANSI C compiler.
  230. # -DUSE_I686_PREFETCH causes the collector to issue Pentium III style
  231. # prefetch instructions. No effect except on X86 Linux platforms.
  232. # Assumes a very recent gcc-compatible compiler and assembler.
  233. # (Gas prefetcht0 support was added around May 1999.)
  234. # Empirically the code appears to still run correctly on Pentium II
  235. # processors, though with no performance benefit. May not run on other
  236. # X86 processors? In some cases this improves performance by
  237. # 15% or so.
  238. # -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
  239. # prefetch instructions. Same restrictions as USE_I686_PREFETCH.
  240. # Minimally tested. Didn't appear to be an obvious win on a K6-2/500.
  241. # -DUSE_PPC_PREFETCH causes the collector to issue PowerPC style
  242. # prefetch instructions. No effect except on PowerPC OS X platforms.
  243. # Performance impact untested.
  244. # -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux
  245. # causes the collector some system and pthread calls in a more transparent
  246. # fashion than the usual macro-based approach. Requires GNU ld, and
  247. # currently probably works only with Linux.
  248. # -DGC_USE_DLOPEN_WRAP causes the collector to redefine malloc and intercepted
  249. # pthread routines with their real names, and causes it to use dlopen
  250. # and dlsym to refer to the original versions. This makes it possible to
  251. # build an LD_PRELOADable malloc replacement library.
  252. # -DTHREAD_LOCAL_ALLOC defines GC_malloc(), GC_malloc_atomic()
  253. # and GC_gcj_malloc() to use a per-thread set of free-lists.
  254. # These then allocate in a way that usually does not involve
  255. # acquisition of a global lock. Currently supported only on platforms
  256. # such as Linux that use pthread_support.c. Recommended for multiprocessors.
  257. # Requires explicit GC_INIT() call, unless REDIRECT_MALLOC is
  258. # defined and GC_malloc is used first.
  259. # -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
  260. # "__thread" thread-local variables. This is the default in HP/UX. It
  261. # may help performance on recent Linux installations. (It failed for
  262. # me on RedHat 8, but appears to work on RedHat 9.)
  263. # -DPARALLEL_MARK allows the marker to run in multiple threads. Recommended
  264. # for multiprocessors. Currently requires Linux on X86 or IA64, though
  265. # support for other Posix platforms should be fairly easy to add,
  266. # if the thread implementation is otherwise supported.
  267. # -DNO_GETENV prevents the collector from looking at environment variables.
  268. # These may otherwise alter its configuration, or turn off GC altogether.
  269. # I don't know of a reason to disable this, except possibly if the
  270. # resulting process runs as a privileged user?
  271. # -DUSE_GLOBAL_ALLOC. Win32 only. Use GlobalAlloc instead of
  272. # VirtualAlloc to allocate the heap. May be needed to work around
  273. # a Windows NT/2000 issue. Incompatible with USE_MUNMAP.
  274. # See README.win32 for details.
  275. # -DMAKE_BACK_GRAPH. Enable GC_PRINT_BACK_HEIGHT environment variable.
  276. # See README.environment for details. Experimental. Limited platform
  277. # support. Implies DBG_HDRS_ALL. All allocation should be done using
  278. # the debug interface.
  279. # -DSTUBBORN_ALLOC allows allocation of "hard to change" objects, and thus
  280. # makes incremental collection easier. Was enabled by default until 6.0.
  281. # Rarely used, to my knowledge.
  282. # -DHANDLE_FORK attempts to make GC_malloc() work in a child process fork()ed
  283. # from a multithreaded parent. Currently only supported by pthread_support.c.
  284. # (Similar code should work on Solaris or Irix, but it hasn't been tried.)
  285. # -DTEST_WITH_SYSTEM_MALLOC causes gctest to allocate (and leak) large chunks
  286. # of memory with the standard system malloc. This will cause the root
  287. # set and collected heap to grow significantly if malloced memory is
  288. # somehow getting traced by the collector. This has no impact on the
  289. # generated library; it only affects the test.
  290. # -DNO_INCREMENTAL cases the gctest program to not invoke the incremental
  291. # collector. This has no impact on the generated library, only on the
  292. # test program. (This is often useful for debugging failures unrelated
  293. # to incremental GC.)
  294. # -DPOINTER_MASK=0x... causes candidate pointers to be ANDed with the
  295. # given mask before being considered. If either this or the following
  296. # macro is defined, it will be assumed that all pointers stored in
  297. # the heap need to be processed this way. Stack and register pointers
  298. # will be considered both with and without processing.
  299. # These macros are normally needed only to support systems that use
  300. # high-order pointer tags. EXPERIMENTAL.
  301. # -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
  302. # by the indicated amount before trying to interpret them. Applied
  303. # after POINTER_MASK. EXPERIMENTAL. See also the preceding macro.
  304. # -DENABLE_TRACE enables the GC_TRACE=addr environment setting to do its
  305. # job. By default this is not supported in order to keep the marker as fast
  306. # as possible.
  307. # -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
  308. # stack bounds in the same way as other pthread ports, without trying to
  309. # walk the frames onthe stack. This is recommended only as a fallback
  310. # for applications that don't support proper stack unwinding.
  311. # -DUSE_PROC_FOR_LIBRARIES Causes the Linux collector to treat writable
  312. # memory mappings (as reported by /proc) as roots, if it doesn't have
  313. # otherinformation about them. It no longer traverses dynamic loader
  314. # data structures to find dynamic library static data. This may be
  315. # required for applications that store pointers in mmapped segments without
  316. # informaing the collector. But it typically performs poorly, especially
  317. # since it will scan inactive but cached NPTL thread stacks completely.
  318. # -DNO_PROC_STAT Causes the collector to avoid relying on Linux'
  319. # /proc/self/stat.
  320. #
  321. CXXFLAGS= $(CFLAGS)
  322. NICEAR = $(mainsrcdir)/utils/nicear
  323. AR= @AR@
  324. ARFLAGS= @ARFLAGS@
  325. RANLIB= @RANLIB@
  326. ARLIBFLAGS = @LDFLAGS@ @LIBS@
  327. OBJS= alloc.@LTO@ reclaim.@LTO@ allchblk.@LTO@ misc.@LTO@ mach_dep.@LTO@ mach_dep1.@LTO@ os_dep.@LTO@ mark_rts.@LTO@ \
  328. headers.@LTO@ mark.@LTO@ obj_map.@LTO@ blacklst.@LTO@ finalize.@LTO@ new_hblk.@LTO@ dbg_mlc.@LTO@ \
  329. malloc.@LTO@ stubborn.@LTO@ checksums.@LTO@ pthread_support.@LTO@ pthread_stop_world.@LTO@ \
  330. darwin_stop_world.@LTO@ typd_mlc.@LTO@ ptr_chck.@LTO@ mallocx.@LTO@ gcj_mlc.@LTO@ specific.@LTO@ \
  331. gc_dlopen.@LTO@ backgraph.@LTO@ win32_threads.@LTO@ thread_local_alloc.@LTO@ openbsd_stop_world.@LTO@
  332. CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c mach_dep1.c os_dep.c mark_rts.c \
  333. headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c \
  334. new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c \
  335. checksums.c pthread_support.c pthread_stop_world.c darwin_stop_world.c \
  336. typd_mlc.c ptr_chck.c mallocx.c gcj_mlc.c specific.c gc_dlopen.c \
  337. backgraph.c win32_threads.c thread_local_alloc.c openbsd_stop_world.c
  338. CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC
  339. CORD_OBJS= cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ cord/cordprnt.@LTO@
  340. SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
  341. sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
  342. include/gc_version.h include/private/gc_hdrs.h include/private/gc_priv.h \
  343. include/private/gcconfig.h include/private/gc_pmark.h \
  344. include/gc_inline.h include/gc_mark.h \
  345. threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
  346. gcname.c include/weakpointer.h include/private/gc_locks.h \
  347. mips_ultrix_mach_dep.s \
  348. include/new_gc_alloc.h include/gc_allocator.h \
  349. include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \
  350. include/gc_backptr.h \
  351. hpux_test_and_clear.s include/gc_gcj.h \
  352. include/private/dbg_mlc.h \
  353. include/private/specific.h \
  354. include/leak_detector.h include/gc_amiga_redirects.h \
  355. include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
  356. include/gc_config_macros.h include/private/pthread_support.h \
  357. include/private/pthread_stop_world.h include/private/darwin_semaphore.h \
  358. include/private/darwin_stop_world.h include/private/thread_local_alloc.h \
  359. include/private/openbsd_stop_world.h $(CORD_SRCS)
  360. DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.O2 \
  361. doc/README.amiga doc/README.cords doc/debugging.html \
  362. doc/porting.html doc/overview.html \
  363. doc/README.dj doc/README.hp doc/README.linux doc/README.rs6000 \
  364. doc/README.sgi doc/README.solaris2 doc/README.uts \
  365. doc/README.win32 doc/barrett_diagram doc/README \
  366. doc/README.contributors doc/README.changes doc/gc.man \
  367. doc/README.environment doc/tree.html doc/gcdescr.html \
  368. doc/README.autoconf doc/README.macros doc/README.ews4800 \
  369. doc/README.DGUX386 doc/README.arm.cross doc/leak.html \
  370. doc/scale.html doc/gcinterface.html doc/README.darwin \
  371. doc/simple_example.html doc/README.win64
  372. TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
  373. tests/leak_test.c tests/thread_leak_test.c tests/middle.c \
  374. tests/smash_test.c tests/huge_test.c
  375. GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
  376. libtool.m4 install-sh configure.host Makefile.in \
  377. aclocal.m4 config.sub config.guess \
  378. include/include.am doc/doc.am \
  379. ltmain.sh mkinstalldirs depcomp missing \
  380. cord/cord.am tests/tests.am autogen.sh \
  381. bdw-gc.pc.in compile
  382. OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \
  383. BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
  384. PCR-Makefile SMakefile.amiga Makefile.DLLs \
  385. digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
  386. NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE \
  387. configure_atomic_ops.sh
  388. # Makefile and Makefile.direct are copies of each other.
  389. OTHER_FILES= Makefile setjmp_t.c callprocs \
  390. MacProjects.sit.hqx MacOS.c \
  391. Mac_files/datastart.c Mac_files/dataend.c \
  392. Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
  393. add_gc_prefix.c gc_cpp.cpp \
  394. AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
  395. $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
  396. CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
  397. $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
  398. UTILS= if_mach if_not_there threadlibs
  399. # Libraries needed for curses applications. Only needed for de.
  400. CURSES= -lcurses -ltermlib
  401. # The following is irrelevant on most systems. But a few
  402. # versions of make otherwise fork the shell specified in
  403. # the SHELL environment variable.
  404. SHELL= /bin/sh
  405. SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include @CFLAGS@ @COMPFLAGS@ @PREFLAGS@
  406. # Alternative flags to the C compiler for mach_dep.c.
  407. # Mach_dep.c often doesn't like optimization, and it's
  408. # not time-critical anyway.
  409. # Set SPECIALCFLAGS to -q nodirect_code on Encore.
  410. all: gc.a gctest
  411. # if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
  412. # the default location, and we need to build
  413. libatomic_ops/libatomic_ops.a:
  414. cd libatomic_ops; $(MAKE)
  415. LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
  416. BSD-pkg-all: bsd-libgc.a bsd-libleak.a
  417. bsd-libgc.a:
  418. $(MAKE) CFLAGS="$(CFLAGS)" clean c++-t
  419. mv gc.a bsd-libgc.a
  420. bsd-libleak.a:
  421. $(MAKE) -f Makefile.direct CFLAGS="$(LEAKFLAGS)" clean c++-nt
  422. mv gc.a bsd-libleak.a
  423. BSD-pkg-install: BSD-pkg-all
  424. ${CP} bsd-libgc.a libgc.a
  425. ${INSTALL_DATA} libgc.a ${PREFIX}/lib
  426. ${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include
  427. ${INSTALL_MAN} doc/gc.man ${PREFIX}/man/man3/gc.3
  428. pcr: PCR-Makefile include/private/gc_private.h include/private/gc_hdrs.h \
  429. include/private/gc_locks.h include/gc.h include/private/gcconfig.h \
  430. mach_dep.@LTO@ $(SRCS)
  431. $(MAKE) -f PCR-Makefile depend
  432. $(MAKE) -f PCR-Makefile
  433. $(OBJS) tests/test.@LTO@ dyn_load.@LTO@ dyn_load_sunos53.@LTO@: \
  434. $(srcdir)/include/private/gc_priv.h \
  435. $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
  436. $(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \
  437. $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
  438. $(srcdir)/include/gc_config_macros.h
  439. # The dependency on Makefile is needed. Changing
  440. # options affects the size of GC_arrays,
  441. # invalidating all .@LTO@ files that rely on gc_priv.h
  442. mark.@LTO@ typd_mlc.@LTO@ finalize.@LTO@ ptr_chck.@LTO@: $(srcdir)/include/gc_mark.h \
  443. $(srcdir)/include/private/gc_pmark.h
  444. specific.@LTO@ pthread_support.@LTO@ thread_local_alloc.@LTO@ win32_threads.@LTO@: \
  445. $(srcdir)/include/private/specific.h $(srcdir)/include/gc_inline.h \
  446. $(srcdir)/include/private/thread_local_alloc.h
  447. dbg_mlc.@LTO@ gcj_mlc.@LTO@: $(srcdir)/include/private/dbg_mlc.h
  448. tests/test.@LTO@: tests $(srcdir)/tests/test.c
  449. $(CC) $(CFLAGS) -c $(srcdir)/tests/test.c
  450. mv test.@LTO@ tests/test.@LTO@
  451. tests:
  452. mkdir tests
  453. # PLTSCHEME: make ../libmzgc.a, and use $(AR), $(RANLIB), and @LIBSFX@:
  454. base_lib ../libmzgc.@LIBSFX@: $(OBJS) dyn_load.@LTO@ $(UTILS)
  455. $(NICEAR) $(AR) $(ARFLAGS) ../libmzgc.@LIBSFX@ $(OBJS) dyn_load.@LTO@
  456. $(RANLIB) ../libmzgc.@LIBSFX@
  457. cords: $(CORD_OBJS) cord/cordtest $(UTILS)
  458. rm -f dont_ar_3
  459. ./if_mach SPARC SOLARIS touch dont_ar_3
  460. ./if_mach SPARC SOLARIS $(AR) rus gc.a $(CORD_OBJS)
  461. ./if_mach M68K AMIGA touch dont_ar_3
  462. ./if_mach M68K AMIGA $(AR) -vrus gc.a $(CORD_OBJS)
  463. ./if_not_there dont_ar_3 $(AR) ru gc.a $(CORD_OBJS)
  464. ./if_not_there dont_ar_3 $(RANLIB) gc.a || cat /dev/null
  465. gc_cpp.@LTO@: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h Makefile
  466. $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
  467. test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h gc_cpp.@LTO@ $(srcdir)/include/gc.h \
  468. base_lib $(UTILS)
  469. rm -f test_cpp
  470. ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.@LTO@ gc.a -ldld `./threadlibs`
  471. ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.@LTO@ gc.a `./threadlibs`
  472. c++-t: c++
  473. ./test_cpp 1
  474. c++-nt: c++
  475. @echo "Use ./test_cpp 1 to test the leak library"
  476. c++: gc_cpp.@LTO@ $(srcdir)/include/gc_cpp.h test_cpp
  477. rm -f dont_ar_4
  478. ./if_mach SPARC SOLARIS touch dont_ar_4
  479. ./if_mach SPARC SOLARIS $(AR) rus gc.a gc_cpp.@LTO@
  480. ./if_mach M68K AMIGA touch dont_ar_4
  481. ./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.@LTO@
  482. ./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.@LTO@
  483. ./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
  484. ./test_cpp 1
  485. echo > c++
  486. # PLTSCHEME: need $(srcdir):
  487. dyn_load_sunos53.@LTO@: $(srcdir)/dyn_load.c
  488. $(CC) $(CFLAGS) -DSUNOS53_SHARED_LIB -c $(srcdir)/dyn_load.c -o $@
  489. # SunOS5 shared library version of the collector
  490. sunos5gc.so: $(OBJS) dyn_load_sunos53.@LTO@
  491. $(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.@LTO@ libatomic_ops/libatomic_ops.a -ldl
  492. ln sunos5gc.so libgc.so
  493. # Alpha/OSF shared library version of the collector
  494. libalphagc.so: $(OBJS)
  495. ld -shared -o libalphagc.so $(OBJS) dyn_load.@LTO@ -lc
  496. ln libalphagc.so libgc.so
  497. # IRIX shared library version of the collector
  498. libirixgc.so: $(OBJS) dyn_load.@LTO@
  499. ld -shared $(ABI_FLAG) -o libirixgc.so $(OBJS) dyn_load.@LTO@ -lc
  500. ln libirixgc.so libgc.so
  501. # Linux shared library version of the collector
  502. liblinuxgc.so: $(OBJS) dyn_load.@LTO@
  503. gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.@LTO@
  504. ln liblinuxgc.so libgc.so
  505. # Build gctest with dynamic library
  506. dyn_test:
  507. $(CC) $(CFLAGS) -o gctest tests/test.c libgc.so `./threadlibs`
  508. ./gctest
  509. # Alternative Linux rule. This is preferable, but is likely to break the
  510. # Makefile for some non-linux platforms.
  511. # LIBOBJS= $(patsubst %.@LTO@, %.lo, $(OBJS))
  512. #
  513. #.SUFFIXES: .lo $(SUFFIXES)
  514. #
  515. #.c.lo:
  516. # $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@
  517. #
  518. # liblinuxgc.so: $(LIBOBJS) dyn_load.lo
  519. # gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo
  520. # touch liblinuxgc.so
  521. mach_dep.@LTO@: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \
  522. $(srcdir)/mips_ultrix_mach_dep.s \
  523. $(srcdir)/rs6000_mach_dep.s \
  524. $(srcdir)/sparc_mach_dep.S $(srcdir)/sparc_sunos4_mach_dep.s \
  525. $(srcdir)/ia64_save_regs_in_stack.s \
  526. $(srcdir)/sparc_netbsd_mach_dep.s $(UTILS)
  527. rm -f mach_dep.@LTO@
  528. ./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.@LTO@ $(srcdir)/sparc_mach_dep.S
  529. ./if_mach SPARC OPENBSD $(AS) -o mach_dep2.@LTO@ $(srcdir)/sparc_sunos4_mach_dep.s
  530. ./if_mach SPARC NETBSD $(AS) -o mach_dep2.@LTO@ $(srcdir)/sparc_netbsd_mach_dep.s
  531. ./if_mach SPARC "" $(CC) -c -o mach_dep2.@LTO@ $(srcdir)/sparc_mach_dep.S
  532. ./if_mach SPARC "" $(CC) -c -o mach_dep1.@LTO@ $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
  533. ./if_mach SPARC "" ld -r -o mach_dep.@LTO@ mach_dep1.@LTO@ mach_dep2.@LTO@
  534. ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.@LTO@ $(srcdir)/ia64_save_regs_in_stack.s
  535. ./if_mach IA64 "" $(CC) -c -o mach_dep1.@LTO@ $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
  536. ./if_mach IA64 "" ld -r -o mach_dep.@LTO@ mach_dep1.@LTO@ ia64_save_regs_in_stack.@LTO@
  537. ./if_not_there mach_dep.@LTO@ $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
  538. # PLTSCHEME: separate mach_dep1 target avoids use of `ld' (which doesn't work well
  539. # in shared-lib mode) to create mach_dep for IA64
  540. mach_dep1.@LTO@: $(srcdir)/mach_dep1.c $(srcdir)/ia64_save_regs_in_stack.s $(UTILS)
  541. rm -f mach_dep1.@LTO@
  542. ./if_mach IA64 "" $(AS) -o mach_dep1.@LTO@ $(srcdir)/ia64_save_regs_in_stack.s
  543. ./if_not_there mach_dep1.@LTO@ $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep1.c
  544. mark_rts.@LTO@: $(srcdir)/mark_rts.c $(UTILS)
  545. rm -f mark_rts.@LTO@
  546. -./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
  547. ./if_not_there mark_rts.@LTO@ $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
  548. # Work-around for DEC optimizer tail recursion elimination bug.
  549. # The ALPHA-specific line should be removed if gcc is used.
  550. alloc.@LTO@: include/gc_version.h
  551. cord:
  552. mkdir cord
  553. cord/cordbscs.@LTO@: cord $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
  554. $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
  555. mv cordbscs.@LTO@ cord/cordbscs.@LTO@
  556. # not all compilers understand -o filename
  557. cord/cordxtra.@LTO@: cord $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
  558. $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordxtra.c
  559. mv cordxtra.@LTO@ cord/cordxtra.@LTO@
  560. cord/cordprnt.@LTO@: cord $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
  561. $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordprnt.c
  562. mv cordprnt.@LTO@ cord/cordprnt.@LTO@
  563. cord/cordtest: $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a $(UTILS)
  564. rm -f cord/cordtest
  565. ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -lucb
  566. ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -ldld `./threadlibs`
  567. ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
  568. ./if_not_there cord/cordtest $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
  569. cord/de: $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a $(UTILS)
  570. rm -f cord/de
  571. ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a $(CURSES) -lucb `./threadlibs`
  572. ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a $(CURSES) -ldld `./threadlibs`
  573. ./if_mach POWERPC AIX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a -lcurses
  574. ./if_mach POWERPC DARWIN $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a
  575. ./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a -lcurses `./threadlibs`
  576. ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a -lcurses `./threadlibs`
  577. ./if_mach IA64 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a -lcurses `./threadlibs`
  578. ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a -lcurses
  579. ./if_not_there cord/de $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.@LTO@ cord/cordxtra.@LTO@ gc.a $(CURSES) `./threadlibs`
  580. if_mach: $(srcdir)/if_mach.c $(srcdir)/include/private/gcconfig.h
  581. $(HOSTCC) $(HOSTCFLAGS) -o if_mach $(srcdir)/if_mach.c
  582. threadlibs: $(srcdir)/threadlibs.c $(srcdir)/include/private/gcconfig.h Makefile
  583. $(HOSTCC) $(HOSTCFLAGS) -o threadlibs $(srcdir)/threadlibs.c
  584. if_not_there: $(srcdir)/if_not_there.c
  585. $(HOSTCC) $(HOSTCFLAGS) -o if_not_there $(srcdir)/if_not_there.c
  586. clean:
  587. rm -f gc.a *.@LTO@ *.exe tests/*.@LTO@ gctest gctest_dyn_link test_cpp \
  588. setjmp_test mon.@LTO@ut gmon.@LTO@ut a.@LTO@ut core if_not_there if_mach \
  589. threadlibs $(CORD_OBJS) cord/cordtest cord/de
  590. -rm -f *~
  591. gctest: tests/test.@LTO@ gc.a $(UTILS)
  592. rm -f gctest
  593. ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest tests/test.@LTO@ gc.a -lucb
  594. ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o gctest tests/test.@LTO@ gc.a -ldld `./threadlibs`
  595. ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o gctest tests/test.@LTO@ gc.a `./threadlibs`
  596. ./if_not_there gctest $(CC) $(CFLAGS) -o gctest tests/test.@LTO@ gc.a `./threadlibs`
  597. # If an optimized setjmp_test generates a segmentation fault,
  598. # odds are your compiler is broken. Gctest may still work.
  599. # Try compiling setjmp_t.c unoptimized.
  600. setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
  601. $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
  602. test: KandRtest cord/cordtest
  603. cord/cordtest
  604. # Those tests that work even with a K&R C compiler:
  605. KandRtest: setjmp_test gctest
  606. ./setjmp_test
  607. ./gctest
  608. add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/include/gc_version.h
  609. $(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
  610. gcname: $(srcdir)/gcname.c $(srcdir)/include/gc_version.h
  611. $(CC) -o gcname $(srcdir)/gcname.c
  612. #We assume this is being done from source directory.
  613. dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
  614. cp Makefile Makefile.@LTO@ld
  615. cp Makefile.direct Makefile
  616. CC=$(CC) ./configure_atomic_ops.sh
  617. cd $(AO_SRC_DIR); $(MAKE) dist
  618. if test $(srcdir)/libatomic_ops-$(AO_VERSION) = $(AO_SRC_DIR); \
  619. then \
  620. mv $(AO_SRC_DIR) $(AO_SRC_DIR).bak ; \
  621. tar xvfz $(AO_SRC_DIR).bak/libatomic_ops-$(AO_VERSION).tar.gz ; \
  622. else \
  623. tar xvfz $(AO_SRC_DIR)/libatomic_ops-$(AO_VERSION).tar.gz ; \
  624. fi
  625. rm -f `./gcname`
  626. ln -s . `./gcname`
  627. ./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops-$(AO_VERSION) > /tmp/gc.tar-files
  628. tar cvfh gc.tar `cat /tmp/gc.tar-files`
  629. cp gc.tar `./gcname`.tar
  630. gzip `./gcname`.tar
  631. rm `./gcname`
  632. gc.tar.Z: gc.tar
  633. compress gc.tar
  634. gc.tar.gz: gc.tar
  635. gzip gc.tar
  636. lint: $(CSRCS) tests/test.c
  637. lint -DLINT $(CSRCS) tests/test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall|change in ANSI|improper alignment"
  638. # BTL: added to test shared library version of collector.
  639. # Currently works only under SunOS5. Requires GC_INIT call from statically
  640. # loaded client code.
  641. ABSDIR = `pwd`
  642. gctest_dyn_link: tests/test.@LTO@ libgc.so
  643. $(CC) -L$(ABSDIR) -R$(ABSDIR) -o gctest_dyn_link tests/test.@LTO@ -lgc -ldl -lthread
  644. gctest_irix_dyn_link: tests/test.@LTO@ libirixgc.so
  645. $(CC) -L$(ABSDIR) -o gctest_irix_dyn_link tests/test.@LTO@ -lirixgc
  646. # The following appear to be dead, especially since libgc_globals.h
  647. # is apparently lost.
  648. test_dll.@LTO@: tests/test.c libgc_globals.h
  649. $(CC) $(CFLAGS) -DGC_USE_DLL -c tests/test.c -o test_dll.@LTO@
  650. test_dll: test_dll.@LTO@ libgc_dll.a libgc.dll
  651. $(CC) test_dll.@LTO@ -L$(ABSDIR) -lgc_dll -o test_dll
  652. SYM_PREFIX-libgc=GC
  653. # Uncomment the following line to build a GNU win32 DLL
  654. # include Makefile.DLLs
  655. reserved_namespace: $(SRCS)
  656. for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
  657. sed s/GC_/_GC_/g < $$file > tmp; \
  658. cp tmp $$file; \
  659. done
  660. user_namespace: $(SRCS)
  661. for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
  662. sed s/_GC_/GC_/g < $$file > tmp; \
  663. cp tmp $$file; \
  664. done
  665. # PLTSCHEME: explicit targets to get $(srcdir) in place for non-gmake
  666. alloc.@LTO@: $(srcdir)/alloc.c
  667. $(CC) $(CFLAGS) -c $(srcdir)/alloc.c
  668. reclaim.@LTO@: $(srcdir)/reclaim.c
  669. $(CC) $(CFLAGS) -c $(srcdir)/reclaim.c
  670. allchblk.@LTO@: $(srcdir)/allchblk.c
  671. $(CC) $(CFLAGS) -c $(srcdir)/allchblk.c
  672. misc.@LTO@: $(srcdir)/misc.c
  673. $(CC) $(CFLAGS) -c $(srcdir)/misc.c
  674. os_dep.@LTO@: $(srcdir)/os_dep.c
  675. $(CC) $(CFLAGS) -c $(srcdir)/os_dep.c
  676. headers.@LTO@: $(srcdir)/headers.c
  677. $(CC) $(CFLAGS) -c $(srcdir)/headers.c
  678. mark.@LTO@: $(srcdir)/mark.c
  679. $(CC) $(CFLAGS) -c $(srcdir)/mark.c
  680. obj_map.@LTO@: $(srcdir)/obj_map.c
  681. $(CC) $(CFLAGS) -c $(srcdir)/obj_map.c
  682. blacklst.@LTO@: $(srcdir)/blacklst.c
  683. $(CC) $(CFLAGS) -c $(srcdir)/blacklst.c
  684. finalize.@LTO@: $(srcdir)/finalize.c
  685. $(CC) $(CFLAGS) -c $(srcdir)/finalize.c
  686. new_hblk.@LTO@: $(srcdir)/new_hblk.c
  687. $(CC) $(CFLAGS) -c $(srcdir)/new_hblk.c
  688. dbg_mlc.@LTO@: $(srcdir)/dbg_mlc.c
  689. $(CC) $(CFLAGS) -c $(srcdir)/dbg_mlc.c
  690. malloc.@LTO@: $(srcdir)/malloc.c
  691. $(CC) $(CFLAGS) -c $(srcdir)/malloc.c
  692. stubborn.@LTO@: $(srcdir)/stubborn.c
  693. $(CC) $(CFLAGS) -c $(srcdir)/stubborn.c
  694. checksums.@LTO@: $(srcdir)/checksums.c
  695. $(CC) $(CFLAGS) -c $(srcdir)/checksums.c
  696. solaris_threads.@LTO@: $(srcdir)/solaris_threads.c
  697. $(CC) $(CFLAGS) -c $(srcdir)/solaris_threads.c
  698. win32_threads.@LTO@: $(srcdir)/win32_threads.c
  699. $(CC) $(CFLAGS) -c $(srcdir)/win32_threads.c
  700. pthread_support.@LTO@: $(srcdir)/pthread_support.c
  701. $(CC) $(CFLAGS) -c $(srcdir)/pthread_support.c
  702. pthread_stop_world.@LTO@: $(srcdir)/pthread_stop_world.c
  703. $(CC) $(CFLAGS) -c $(srcdir)/pthread_stop_world.c
  704. darwin_stop_world.@LTO@: $(srcdir)/darwin_stop_world.c
  705. $(CC) $(CFLAGS) -c $(srcdir)/darwin_stop_world.c
  706. openbsd_stop_world.@LTO@: $(srcdir)/openbsd_stop_world.c
  707. $(CC) $(CFLAGS) -c $(srcdir)/openbsd_stop_world.c
  708. backgraph.@LTO@: $(srcdir)/backgraph.c
  709. $(CC) $(CFLAGS) -c $(srcdir)/backgraph.c
  710. typd_mlc.@LTO@: $(srcdir)/typd_mlc.c
  711. $(CC) $(CFLAGS) -c $(srcdir)/typd_mlc.c
  712. ptr_chck.@LTO@: $(srcdir)/ptr_chck.c
  713. $(CC) $(CFLAGS) -c $(srcdir)/ptr_chck.c
  714. mallocx.@LTO@: $(srcdir)/mallocx.c
  715. $(CC) $(CFLAGS) -c $(srcdir)/mallocx.c
  716. solaris_pthreads.@LTO@: $(srcdir)/solaris_pthreads.c
  717. $(CC) $(CFLAGS) -c $(srcdir)/solaris_pthreads.c
  718. gcj_mlc.@LTO@: $(srcdir)/gcj_mlc.c
  719. $(CC) $(CFLAGS) -c $(srcdir)/gcj_mlc.c
  720. specific.@LTO@: $(srcdir)/specific.c
  721. $(CC) $(CFLAGS) -c $(srcdir)/specific.c
  722. gc_dlopen.@LTO@: $(srcdir)/gc_dlopen.c
  723. $(CC) $(CFLAGS) -c $(srcdir)/gc_dlopen.c
  724. dyn_load.@LTO@: $(srcdir)/dyn_load.c
  725. $(CC) $(CFLAGS) -c $(srcdir)/dyn_load.c
  726. thread_local_alloc.@LTO@: $(srcdir)/thread_local_alloc.c
  727. $(CC) $(CFLAGS) -c $(srcdir)/thread_local_alloc.c