]> granicus.if.org Git - gc/blob - Makefile.am
Fix a typo in GC_init comment
[gc] / Makefile.am
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:0:5
18 LIBGCCPP_VER_INFO = 5:0:4
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 gcj_mlc.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_DISCLAIM
107 libgc_la_SOURCES += fnlz_mlc.c
108 pkginclude_HEADERS += include/gc_disclaim.h
109 endif
110
111 ## End of !SINGLE_GC_OBJ
112 endif
113
114 if USE_INTERNAL_LIBATOMIC_OPS
115 nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c
116 endif
117
118 if NEED_ATOMIC_OPS_ASM
119 nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S
120 endif
121
122 # Include THREADDLLIBS here to ensure that the correct versions of
123 # linuxthread semaphore functions get linked:
124 libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS)
125 libgc_la_DEPENDENCIES = @addobjs@
126 libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info $(LIBGC_VER_INFO) \
127     -no-undefined
128
129 EXTRA_libgc_la_SOURCES = ia64_save_regs_in_stack.s sparc_mach_dep.S \
130     sparc_netbsd_mach_dep.s
131
132 if CPLUSPLUS
133 # C++ Interface
134 # -------------
135 lib_LTLIBRARIES += libgccpp.la
136 pkginclude_HEADERS += include/gc_allocator.h include/gc_cpp.h
137 include_HEADERS += include/extra/gc_cpp.h
138 libgccpp_la_SOURCES = gc_cpp.cc
139 libgccpp_la_LIBADD = ./libgc.la
140 libgccpp_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
141 endif
142
143 ## FIXME: If Visual C++ users use Makefile.am, this should go into
144 ## pkginclude_HEADERS with proper AM_CONDITIONALization.  Otherwise
145 ## delete this comment.
146 EXTRA_DIST += gc_cpp.cpp
147
148
149 # Misc
150 # ----
151
152 AM_CXXFLAGS = @GC_CFLAGS@
153 AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
154
155 CFLAGS += $(CFLAGS_EXTRA)
156 CXXFLAGS += $(CFLAGS_EXTRA)
157
158 ## FIXME: relies on internal code generated by automake.
159 ## FIXME: ./configure --enable-dependency-tracking should be used
160 #all_objs = @addobjs@ $(libgc_la_OBJECTS)
161 #$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
162 #include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
163 #include/gc_pthread_redirects.h include/gc_config_macros.h \
164 #include/private/thread_local_alloc.h include/private_support.h \
165 #include/private/pthread_stop_world.h \
166 #include/gc_mark.h @addincludes@
167
168 ## FIXME: we shouldn't have to do this, but automake forces us to.
169 ## We use -Wp,-P to strip #line directives.  Irix `as' chokes on
170 ## these.
171 if ASM_WITH_CPP_UNSUPPORTED
172   ASM_CPP_OPTIONS =
173 else
174   ASM_CPP_OPTIONS = -Wp,-P -x assembler-with-cpp
175 endif
176
177 .s.lo:
178         $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
179
180 .S.lo:
181         $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
182
183 ## We need to add DEFS to assembler flags
184 ## :FIXME: what if assembler does not accept -D... ?
185 ## (use Autoconf to prepare ASDEFS?)
186
187 CCASFLAGS += $(DEFS)
188
189 # headers which are not installed
190 # (see include/include.am for more)
191 #
192
193 # documentation which is not installed
194 #
195 EXTRA_DIST += README.QUICK
196
197 # other makefiles
198 # :GOTCHA: deliberately we do not include 'Makefile'
199 EXTRA_DIST += NT_MAKEFILE OS2_MAKEFILE PCR-Makefile digimars.mak \
200     Makefile.direct SMakefile.amiga WCC_MAKEFILE autogen.sh CMakeLists.txt \
201     build/s60v3/bld.inf build/s60v3/libgc.mmp
202
203 # files used by makefiles other than Makefile.am
204 #
205 EXTRA_DIST += tools/if_mach.c tools/if_not_there.c tools/setjmp_t.c \
206     tools/threadlibs.c extra/MacOS.c extra/AmigaOS.c \
207     extra/symbian/global_end.cpp extra/symbian/global_start.cpp \
208     extra/symbian/init_global_static_roots.cpp extra/symbian.cpp \
209     extra/pcr_interface.c extra/real_malloc.c \
210     extra/Mac_files/datastart.c extra/Mac_files/dataend.c \
211     extra/Mac_files/MacOS_config.h \
212     include/private/msvc_dbg.h extra/msvc_dbg.c tools/callprocs.sh
213
214 #
215 # :GOTCHA: GNU make rule for making .s out of .S is flawed,
216 # it will not remove dest if building fails
217 .S.s:
218         if $(CPP) $< >$@ ; then :; else rm -f $@; fi
219
220 include include/include.am
221 include cord/cord.am
222 include tests/tests.am
223 include doc/doc.am
224 ## Putting these at the top causes cord to be built first, and not find
225 ## libgc.a on HP/UX.  There may be a better fix.