12
12
# Original author: Tom Tromey
13
13
# Severely truncated by Hans-J. Boehm
14
14
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
15
# Modified by: Petter Urkedal <petter.urkedal@nordita.dk> (2005-04)
16
17
## Process this file with automake to produce Makefile.in.
18
19
## FIXME: `make distcheck' in this directory will not currently work.
19
20
## This is most likely to the explicit flags passed to submakes.
21
AUTOMAKE_OPTIONS = foreign
22
# We currently use the source files directly from libatomic_ops, if we
23
# use the internal version. This is done since libatomic_ops doesn't
24
# use libtool, since it has no real use for it. But that seems to make
25
# it hard to use either the resulting object files or libraries.
26
# Thus there seems too be no real reason to recusively build in the
27
# libatomic_ops directory.
28
# if USE_INTERNAL_LIBATOMICS_OPS
29
# SUBDIRS = @maybe_libatomic_ops@
35
# Initialize variables so that we can declare files locally.
26
## more items will be succesively added below
33
lib_LTLIBRARIES = libgc.la $(extra)
36
asm_libgc_sources = powerpc_darwin_mach_dep.s
41
libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
42
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
43
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
44
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
45
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
46
backgraph.c win32_threads.c \
47
pthread_support.c pthread_stop_world.c darwin_stop_world.c \
44
pkgconfigdir = $(libdir)/pkgconfig
45
dist_pkgconfig_DATA = bdw-gc.pc
50
lib_LTLIBRARIES += libgc.la
52
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
53
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
54
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
55
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
56
specific.c stubborn.c typd_mlc.c \
57
backgraph.c thread_local_alloc.c
59
# C Library: Architecture Dependent
60
# ---------------------------------
63
libgc_la_SOURCES += pthread_support.c pthread_stop_world.c
67
libgc_la_SOURCES += darwin_stop_world.c
71
libgc_la_SOURCES += win32_threads.c
74
if USE_INTERNAL_LIBATOMIC_OPS
75
nodist_libgc_la_SOURCES = ./atomic_ops.c
78
if NEED_ATOMIC_OPS_ASM
79
nodist_libgc_la_SOURCES = ./atomic_ops_sysdeps.S
50
82
# Include THREADDLLIBS here to ensure that the correct versions of
51
83
# linuxthread semaphore functions get linked:
52
84
libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
53
85
libgc_la_DEPENDENCIES = @addobjs@
54
libgc_la_LDFLAGS = -version-info 1:2:0
86
libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
56
88
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
57
mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
89
mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
58
90
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
59
91
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
98
lib_LTLIBRARIES += libgccpp.la
99
pkginclude_HEADERS += include/gc_cpp.h include/gc_allocator.h
61
100
libgccpp_la_SOURCES = gc_cpp.cc
62
libgccpp_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS) libgc.la
63
libgccpp_la_LDFLAGS = -version-info 1:2:0
65
EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
101
libgccpp_la_LIBADD = ./libgc.la
102
libgccpp_la_LDFLAGS = -version-info 1:3:0 -no-undefined
105
# FIXME: If Visual C++ users use Makefile.am, this should go into
106
# pkginclude_HEADERS with proper AM_CONDITIONALization. Otherwise
107
# delete this comment.
108
EXTRA_DIST += gc_cpp.cpp
67
114
AM_CXXFLAGS = @GC_CFLAGS@
68
115
AM_CFLAGS = @GC_CFLAGS@
71
extra_checks = test_cpp
76
check_PROGRAMS = gctest $(extra_checks)
78
test.o: $(srcdir)/tests/test.c
79
$(COMPILE) -c $(srcdir)/tests/test.c
80
# Using $< in the above seems to fail with the HP/UX on Itanium make.
81
test_cpp.o: $(srcdir)/tests/test_cpp.cc
82
$(CXXCOMPILE) -c $(srcdir)/tests/test_cpp.cc
84
## FIXME: this is probably the reason why some files from BUILT_SOURCES
85
## are included in the distribution
86
# gctest_OBJECTS = test.o
87
gctest_SOURCES = tests/test.c
88
gctest_LDADD = ./libgc.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
89
test_cpp_SOURCES = tests/test_cpp.cc
90
test_cpp_LDADD = ./libgc.la ./libgccpp.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
92
TESTS = $(check_PROGRAMS)
94
117
## FIXME: relies on internal code generated by automake.
95
all_objs = @addobjs@ $(libgc_la_OBJECTS)
96
$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
97
include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
98
include/gc_pthread_redirects.h include/gc_config_macros.h \
99
include/gc_mark.h @addincludes@
118
## FIXME: ./configure --enable-dependency-tracking should be used
119
#all_objs = @addobjs@ $(libgc_la_OBJECTS)
120
#$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
121
#include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
122
#include/gc_pthread_redirects.h include/gc_config_macros.h \
123
#include/private/thread_local_alloc.h include/private_support.h \
124
#include/private/pthread_stop_world.h \
125
#include/gc_mark.h @addincludes@
101
127
## FIXME: we shouldn't have to do this, but automake forces us to.
128
## We use -Wp,-P to strip #line directives. Irix `as' chokes on
103
131
## XLC neither requires nor tolerates the unnecessary assembler goop
104
132
ASM_CPP_OPTIONS =
138
164
EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
139
165
OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
140
166
Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
167
WCC_MAKEFILE configure_atomic_ops.sh \
168
NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE \
169
NT_X64_THREADS_MAKEFILE
143
171
# files used by makefiles other than Makefile.am
145
173
EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
146
hpux_test_and_clear.s pc_excludes gc.mak MacOS.c \
174
hpux_test_and_clear.s gc.mak MacOS.c \
147
175
MacProjects.sit.hqx mach_dep.c setjmp_t.c \
148
176
threadlibs.c AmigaOS.c \
149
177
Mac_files/datastart.c Mac_files/dataend.c \
150
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h
152
# part of C++ interface
154
EXTRA_DIST += gc_cpp.cc gc_cpp.cpp
156
# tests not used by Makefile.am (:FIXME: why?)
158
EXTRA_DIST += tests/test_cpp.cc tests/trace_test.c \
159
tests/leak_test.c tests/thread_leak_test.c
163
EXTRA_DIST += cord/cordbscs.c cord/cordtest.c cord/de.c cord/de_win.c \
164
cord/de_win.ICO cord/cordprnt.c cord/cordxtra.c cord/de_cmds.h \
165
cord/de_win.h cord/de_win.RC
178
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
179
include/private/msvc_dbg.h msvc_dbg.c
181
# The libatomic_ops library. This is not ideal, since we pick up junk from
182
# there. The hard-coded version number should also go.
183
EXTRA_DIST += libatomic_ops-1.2
167
185
# this is an auxiliary shell file used by Makefile and Makefile.direct