Debian Codegraph @

gc/Makefile.am

raw
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
12 ## Process this file with automake to produce Makefile.in.
13
14 # Info (current:revision:age) for the Libtool versioning system.
15 # These numbers should be updated at most once just before the release,
16 # and, optionally, at most once during the development (after the release).
17 LIBGC_VER_INFO = 6:4:5
18 LIBGCCPP_VER_INFO = 6:0:5
19
20 ## FIXME: `make distcheck' in this directory will not currently work.
21 ## This is most likely to the explicit flags passed to submakes.
22
23 # We currently use the source files directly from libatomic_ops, if we
24 # use the internal version. This is done since libatomic_ops doesn't
25 # use libtool, since it has no real use for it. But that seems to make
26 # it hard to use either the resulting object files or libraries.
27 # Thus there seems to be no real reason to recursively build in the
28 # libatomic_ops directory.
29 # if USE_INTERNAL_LIBATOMICS_OPS
30 # SUBDIRS = @maybe_libatomic_ops@
31 # else
32 # SUBDIRS =
33 # endif
34 SUBDIRS =
35
36 ACLOCAL_AMFLAGS = -I m4
37 AM_CPPFLAGS = \
38 -I$(top_builddir)/include -I$(top_srcdir)/include \
39 $(ATOMIC_OPS_CFLAGS)
40
41 ## Initialize variables so that we can declare files locally.
42 EXTRA_DIST =
43 lib_LTLIBRARIES =
44 include_HEADERS =
45 pkginclude_HEADERS =
46 dist_noinst_HEADERS =
47 check_PROGRAMS =
48 check_LTLIBRARIES =
49 TESTS =
50
51 pkgconfigdir = $(libdir)/pkgconfig
52 pkgconfig_DATA = bdw-gc.pc
53
54 # C Library
55 # ---------
56
57 lib_LTLIBRARIES += libgc.la
58
59 if SINGLE_GC_OBJ
60
61 libgc_la_SOURCES = extra/gc.c
62
63 if PTHREAD_START_STANDALONE
64 AM_CPPFLAGS += -DGC_PTHREAD_START_STANDALONE
65 libgc_la_SOURCES += pthread_start.c
66 endif
67
68 else
69
70 EXTRA_DIST += extra/gc.c
71 libgc_la_SOURCES = \
72 allchblk.c alloc.c blacklst.c dbg_mlc.c \
73 dyn_load.c finalize.c gc_dlopen.c headers.c \
74 mach_dep.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
75 obj_map.c os_dep.c ptr_chck.c reclaim.c specific.c typd_mlc.c
76
77 # C Library: Architecture Dependent
78 # ---------------------------------
79
80 if WIN32_THREADS
81 libgc_la_SOURCES += win32_threads.c
82 else
83 if PTHREADS
84 # Not Cygwin or MinGW.
85 libgc_la_SOURCES += pthread_start.c pthread_support.c
86 if DARWIN_THREADS
87 libgc_la_SOURCES += darwin_stop_world.c
88 else
89 libgc_la_SOURCES += pthread_stop_world.c
90 endif
91 endif
92 endif
93
94 if THREAD_LOCAL_ALLOC
95 libgc_la_SOURCES += thread_local_alloc.c
96 endif
97
98 if MAKE_BACK_GRAPH
99 libgc_la_SOURCES += backgraph.c
100 endif
101
102 if CHECKSUMS
103 libgc_la_SOURCES += checksums.c
104 endif
105
106 if ENABLE_GCJ_SUPPORT
107 libgc_la_SOURCES += gcj_mlc.c
108 endif
109
110 if ENABLE_DISCLAIM
111 libgc_la_SOURCES += fnlz_mlc.c
112 endif
113
114 ## End of !SINGLE_GC_OBJ
115 endif
116
117 if PTHREADS
118 pkginclude_HEADERS += include/gc_pthread_redirects.h
119 endif
120
121 if ENABLE_GCJ_SUPPORT
122 pkginclude_HEADERS += include/gc_gcj.h
123 endif
124
125 if ENABLE_DISCLAIM
126 pkginclude_HEADERS += include/gc_disclaim.h
127 endif
128
129 if USE_INTERNAL_LIBATOMIC_OPS
130 nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c
131 if NEED_ATOMIC_OPS_ASM
132 nodist_libgc_la_SOURCES += libatomic_ops/src/atomic_ops_sysdeps.S
133 endif
134 endif
135
136 # Include THREADDLLIBS here to ensure that the correct versions of
137 # linuxthread semaphore (and clock_gettime) functions get linked:
138 libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS)
139 libgc_la_DEPENDENCIES = @addobjs@
140 libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info $(LIBGC_VER_INFO) \
141 -no-undefined
142
143 EXTRA_libgc_la_SOURCES = ia64_save_regs_in_stack.s sparc_mach_dep.S \
144 sparc_netbsd_mach_dep.s
145
146 if CPLUSPLUS
147 # C++ Interface
148 # -------------
149 lib_LTLIBRARIES += libgccpp.la
150 pkginclude_HEADERS += include/gc_allocator.h include/gc_cpp.h
151 include_HEADERS += include/extra/gc_cpp.h
152 libgccpp_la_SOURCES = gc_badalc.cc gc_cpp.cc
153 libgccpp_la_LIBADD = libgc.la
154 libgccpp_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
155 if GC_TBA_LIBRARY
156 # The same as libgccpp but contains only gc_badalc.o.
157 lib_LTLIBRARIES += libgctba.la
158 libgctba_la_SOURCES = gc_badalc.cc
159 libgctba_la_LIBADD = libgc.la
160 # Set the same version as for libgccpp.
161 libgctba_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
162 endif
163 endif
164
165 ## FIXME: If Visual C++ users use Makefile.am, this should go into
166 ## pkginclude_HEADERS with proper AM_CONDITIONALization. Otherwise
167 ## delete this comment.
168 EXTRA_DIST += gc_badalc.cpp gc_cpp.cpp
169
170
171 # Misc
172 # ----
173
174 AM_CXXFLAGS = @GC_CFLAGS@
175 AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
176
177 CFLAGS += $(CFLAGS_EXTRA)
178 CXXFLAGS += $(CFLAGS_EXTRA)
179
180 ## FIXME: relies on internal code generated by automake.
181 ## FIXME: ./configure --enable-dependency-tracking should be used
182 #all_objs = @addobjs@ $(libgc_la_OBJECTS)
183 #$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
184 #include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
185 #include/gc_pthread_redirects.h include/gc_config_macros.h \
186 #include/private/thread_local_alloc.h include/private_support.h \
187 #include/private/pthread_stop_world.h \
188 #include/gc_mark.h @addincludes@
189
190 ## FIXME: we shouldn't have to do this, but automake forces us to.
191 ## We use -Wp,-P to strip #line directives. Irix `as' chokes on
192 ## these.
193 if ASM_WITH_CPP_UNSUPPORTED
194 ASM_CPP_OPTIONS =
195 else
196 ASM_CPP_OPTIONS = -Wp,-P -x assembler-with-cpp
197 endif
198
199 .s.lo:
200 $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
201
202 .S.lo:
203 $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
204
205 ## We need to add DEFS to assembler flags
206 ## :FIXME: what if assembler does not accept -D... ?
207 ## (use Autoconf to prepare ASDEFS?)
208
209 CCASFLAGS += $(DEFS)
210
211 # headers which are not installed
212 # (see include/include.am for more)
213 #
214
215 # documentation which is not installed
216 #
217 EXTRA_DIST += README.QUICK
218
219 # other makefiles
220 EXTRA_DIST += NT_MAKEFILE OS2_MAKEFILE PCR-Makefile digimars.mak \
221 Makefile.direct SMakefile.amiga WCC_MAKEFILE autogen.sh CMakeLists.txt \
222 Config.cmake.in build/s60v3/bld.inf build/s60v3/libgc.mmp
223
224 # files used by makefiles other than Makefile.am
225 #
226 EXTRA_DIST += tools/if_mach.c tools/if_not_there.c tools/setjmp_t.c \
227 tools/threadlibs.c extra/MacOS.c extra/AmigaOS.c \
228 extra/symbian/global_end.cpp extra/symbian/global_start.cpp \
229 extra/symbian/init_global_static_roots.cpp extra/symbian.cpp \
230 extra/pcr_interface.c extra/real_malloc.c \
231 extra/Mac_files/datastart.c extra/Mac_files/dataend.c \
232 extra/Mac_files/MacOS_config.h \
233 include/private/msvc_dbg.h extra/msvc_dbg.c tools/callprocs.sh
234
235 #
236 # :GOTCHA: GNU make rule for making .s out of .S is flawed,
237 # it will not remove dest if building fails
238 .S.s:
239 if $(CPP) $< >$@ ; then :; else rm -f $@; fi
240
241 include include/include.am
242 include cord/cord.am
243 include tests/tests.am
244 include doc/doc.am
245 ## Putting these at the top causes cord to be built first, and not find
246 ## libgc.a on HP/UX. There may be a better fix.
247
248 # A dummy target for mono build.
249 test-bundle: