1 # This is the original manually generated Makefile. It may still be used
2 # to build the collector.
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.
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.
18 AS_ABI_FLAG=$(ABI_FLAG)
19 # ABI flag for assembler. On HP/UX this is +A64 for 64 bit
25 # The above doesn't work with gas, which doesn't run cpp.
26 # Define AS as `gcc -c -x assembler-with-cpp' instead.
28 # Redefining srcdir allows object code for the nonPCR version of the collector
29 # to be generated in different directories.
33 # Atomic_ops installation directory. If this doesn't exist, we create
34 # it from the included libatomic_ops distribution.
35 AO_SRC_DIR=$(srcdir)/libatomic_ops
36 AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install
38 CFLAGS= -O -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
40 # To build the parallel collector on Linux, add to the above:
41 # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
42 # To build the thread-capable preload library that intercepts
43 # malloc, add -DGC_USE_DLOPEN_WRAP -DREDIRECT_MALLOC=GC_malloc -fpic
44 # To build the parallel collector in a static library on HP/UX,
46 # -DGC_HPUX_THREADS -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
47 # FIXME: PARALLEL_MARK currently broken on HP/UX.
48 # To build the thread-safe collector on Tru64, add to the above:
49 # -pthread -DGC_OSF1_THREADS
51 # HOSTCC and HOSTCFLAGS are used to build executables that will be run as
52 # part of the build process, i.e. on the build machine. These will usually
53 # be the same as CC and CFLAGS, except in a cross-compilation environment.
54 # Note that HOSTCFLAGS should include any -D flags that affect thread support.
58 # For dynamic library builds, it may be necessary to add flags to generate
59 # PIC code, e.g. -fPIC on Linux.
61 # Setjmp_test may yield overly optimistic results when compiled
62 # without optimization.
64 # Look into doc/README.macros for the description of the "define arguments"
65 # influencing the collector configuration.
72 OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o \
73 headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o \
74 malloc.o stubborn.o checksums.o pthread_support.o pthread_stop_world.o \
75 darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o gcj_mlc.o specific.o \
76 gc_dlopen.o backgraph.o win32_threads.o thread_local_alloc.o
78 CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c \
79 headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c \
80 new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c \
81 checksums.c pthread_support.c pthread_stop_world.c darwin_stop_world.c \
82 typd_mlc.c ptr_chck.c mallocx.c gcj_mlc.c specific.c gc_dlopen.c \
83 backgraph.c win32_threads.c thread_local_alloc.c
85 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
87 CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
89 SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
90 sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
91 include/gc_version.h include/private/gc_hdrs.h include/private/gc_priv.h \
92 include/private/gcconfig.h include/private/gc_pmark.h \
93 include/gc_inline.h include/gc_mark.h extra/threadlibs.c \
94 extra/if_mach.c extra/if_not_there.c gc_cpp.cc include/gc_cpp.h \
95 extra/gcname.c include/weakpointer.h include/private/gc_locks.h \
96 mips_ultrix_mach_dep.s \
97 include/new_gc_alloc.h include/gc_allocator.h \
98 include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \
99 include/gc_backptr.h \
100 hpux_test_and_clear.s include/gc_gcj.h \
101 include/private/dbg_mlc.h \
102 include/private/specific.h \
103 include/leak_detector.h include/gc_amiga_redirects.h \
104 include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
105 include/gc_config_macros.h include/private/pthread_support.h \
106 include/private/pthread_stop_world.h include/private/darwin_semaphore.h \
107 include/private/darwin_stop_world.h include/private/thread_local_alloc.h \
110 DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
111 doc/README.amiga doc/README.cords doc/debugging.html \
112 doc/porting.html doc/overview.html \
113 doc/README.dj doc/README.hp doc/README.linux doc/README.rs6000 \
114 doc/README.sgi doc/README.solaris2 doc/README.uts \
115 doc/README.win32 doc/barrett_diagram doc/README \
116 doc/README.contributors doc/README.changes doc/gc.man \
117 doc/README.environment doc/tree.html doc/gcdescr.html \
118 doc/README.autoconf doc/README.macros doc/README.ews4800 \
119 doc/README.DGUX386 doc/README.arm.cross doc/leak.html \
120 doc/scale.html doc/gcinterface.html doc/README.darwin \
121 doc/simple_example.html doc/README.win64
123 TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
124 tests/leak_test.c tests/thread_leak_test.c tests/middle.c \
125 tests/smash_test.c tests/huge_test.c
127 GNU_BUILD_FILES= configure.ac Makefile.am configure \
128 install-sh configure.host Makefile.in \
129 aclocal.m4 config.sub config.guess \
130 include/include.am doc/doc.am \
131 ltmain.sh mkinstalldirs depcomp missing \
132 cord/cord.am tests/tests.am autogen.sh \
135 OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE gc.mak \
136 BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
137 PCR-Makefile SMakefile.amiga Makefile.DLLs \
138 digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
139 NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE \
140 build_atomic_ops.sh build_atomic_ops.sh.cygwin
142 OTHER_FILES= Makefile extra/setjmp_t.c callprocs \
143 MacProjects.sit.hqx extra/MacOS.c \
144 Mac_files/datastart.c Mac_files/dataend.c \
145 Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
146 extra/add_gc_prefix.c gc_cpp.cpp \
147 extra/AmigaOS.c extra/msvc_dbg.c include/private/msvc_dbg.h \
148 $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
150 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
151 $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
153 UTILS= if_mach if_not_there threadlibs
155 # Libraries needed for curses applications. Only needed for de.
156 CURSES= -lcurses -ltermlib
158 # The following is irrelevant on most systems. But a few
159 # versions of make otherwise fork the shell specified in
160 # the SHELL environment variable.
163 SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include
164 # Alternative flags to the C compiler for mach_dep.c.
165 # Mach_dep.c often doesn't like optimization, and it's
166 # not time-critical anyway.
167 # Set SPECIALCFLAGS to -q nodirect_code on Encore.
171 # if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
172 # the default location, and we need to build
174 CC=$(CC) MAKE=$(MAKE) $(srcdir)/build_atomic_ops.sh
176 LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
178 BSD-pkg-all: bsd-libgc.a bsd-libleak.a
181 $(MAKE) CFLAGS="$(CFLAGS)" clean c++-t
185 $(MAKE) -f Makefile.direct CFLAGS="$(LEAKFLAGS)" clean c++-nt
186 mv gc.a bsd-libleak.a
188 BSD-pkg-install: BSD-pkg-all
189 ${CP} bsd-libgc.a libgc.a
190 ${INSTALL_DATA} libgc.a ${PREFIX}/lib
191 ${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include
192 ${INSTALL_MAN} doc/gc.man ${PREFIX}/man/man3/gc.3
194 pcr: PCR-Makefile include/private/gc_private.h include/private/gc_hdrs.h \
195 include/private/gc_locks.h include/gc.h include/private/gcconfig.h \
197 $(MAKE) -f PCR-Makefile depend
198 $(MAKE) -f PCR-Makefile
200 $(OBJS) tests/test.o dyn_load.o dyn_load_sunos53.o: \
201 $(srcdir)/include/private/gc_priv.h \
202 $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
203 $(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \
204 $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
205 $(srcdir)/include/gc_config_macros.h Makefile $(AO_INSTALL_DIR)
206 # The dependency on Makefile is needed. Changing
207 # options affects the size of GC_arrays,
208 # invalidating all .o files that rely on gc_priv.h
210 mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h \
211 $(srcdir)/include/private/gc_pmark.h
213 specific.o pthread_support.o thread_local_alloc.o win32_threads.o: \
214 $(srcdir)/include/private/specific.h $(srcdir)/include/gc_inline.h \
215 $(srcdir)/include/private/thread_local_alloc.h
217 dbg_mlc.o gcj_mlc.o: $(srcdir)/include/private/dbg_mlc.h
219 tests/test.o: tests $(srcdir)/tests/test.c
220 $(CC) $(CFLAGS) -c $(srcdir)/tests/test.c
221 mv test.o tests/test.o
226 base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
229 cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a
230 ./if_mach SPARC SOLARIS touch dont_ar_1
231 ./if_mach SPARC SOLARIS $(AR) rus gc.a $(OBJS) dyn_load.o
232 ./if_mach M68K AMIGA touch dont_ar_1
233 ./if_mach M68K AMIGA $(AR) -vrus gc.a $(OBJS) dyn_load.o
234 ./if_not_there dont_ar_1 $(AR) ru gc.a $(OBJS) dyn_load.o
235 ./if_not_there dont_ar_1 $(RANLIB) gc.a || cat /dev/null
236 # ignore ranlib failure; that usually means it doesn't exist, and isn't needed
238 cords: $(CORD_OBJS) cord/cordtest $(UTILS)
240 ./if_mach SPARC SOLARIS touch dont_ar_3
241 ./if_mach SPARC SOLARIS $(AR) rus gc.a $(CORD_OBJS)
242 ./if_mach M68K AMIGA touch dont_ar_3
243 ./if_mach M68K AMIGA $(AR) -vrus gc.a $(CORD_OBJS)
244 ./if_not_there dont_ar_3 $(AR) ru gc.a $(CORD_OBJS)
245 ./if_not_there dont_ar_3 $(RANLIB) gc.a || cat /dev/null
247 gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h Makefile
248 $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
250 test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h gc_cpp.o $(srcdir)/include/gc.h \
253 ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
254 ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
260 @echo "Use ./test_cpp 1 to test the leak library"
262 c++: gc_cpp.o $(srcdir)/include/gc_cpp.h test_cpp
264 ./if_mach SPARC SOLARIS touch dont_ar_4
265 ./if_mach SPARC SOLARIS $(AR) rus gc.a gc_cpp.o
266 ./if_mach M68K AMIGA touch dont_ar_4
267 ./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
268 ./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
269 ./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
273 dyn_load_sunos53.o: dyn_load.c
274 $(CC) $(CFLAGS) -DSUNOS53_SHARED_LIB -c $(srcdir)/dyn_load.c -o $@
276 # SunOS5 shared library version of the collector
277 sunos5gc.so: $(OBJS) dyn_load_sunos53.o
278 $(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o $(AO_INSTALL_DIR)/lib/libatomic_ops.a -ldl
279 ln sunos5gc.so libgc.so
281 # Alpha/OSF shared library version of the collector
282 libalphagc.so: $(OBJS)
283 ld -shared -o libalphagc.so $(OBJS) dyn_load.o -lc
284 ln libalphagc.so libgc.so
286 # IRIX shared library version of the collector
287 libirixgc.so: $(OBJS) dyn_load.o
288 ld -shared $(ABI_FLAG) -o libirixgc.so $(OBJS) dyn_load.o -lc
289 ln libirixgc.so libgc.so
291 # Linux shared library version of the collector
292 liblinuxgc.so: $(OBJS) dyn_load.o
293 gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o
294 ln liblinuxgc.so libgc.so
296 # Build gctest with dynamic library
298 $(CC) $(CFLAGS) -o gctest tests/test.c libgc.so `./threadlibs`
301 # Alternative Linux rule. This is preferable, but is likely to break the
302 # Makefile for some non-linux platforms.
303 # LIBOBJS= $(patsubst %.o, %.lo, $(OBJS))
305 #.SUFFIXES: .lo $(SUFFIXES)
308 # $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@
310 # liblinuxgc.so: $(LIBOBJS) dyn_load.lo
311 # gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo
312 # touch liblinuxgc.so
314 mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \
315 $(srcdir)/mips_ultrix_mach_dep.s \
316 $(srcdir)/rs6000_mach_dep.s \
317 $(srcdir)/sparc_mach_dep.S $(srcdir)/sparc_sunos4_mach_dep.s \
318 $(srcdir)/ia64_save_regs_in_stack.s \
319 $(srcdir)/sparc_netbsd_mach_dep.s $(UTILS)
321 ./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/sparc_mach_dep.S
322 ./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_sunos4_mach_dep.s
323 ./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_netbsd_mach_dep.s
324 ./if_mach SPARC "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
325 ./if_mach SPARC "" ld -r -o mach_dep.o mach_dep1.o mach_dep2.o
326 ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s
327 ./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
328 ./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o
329 ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
331 mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
333 -./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
334 ./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
335 # Work-around for DEC optimizer tail recursion elimination bug.
336 # The ALPHA-specific line should be removed if gcc is used.
338 alloc.o: include/gc_version.h
343 cord/cordbscs.o: cord $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
344 $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
345 mv cordbscs.o cord/cordbscs.o
346 # not all compilers understand -o filename
348 cord/cordxtra.o: cord $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
349 $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordxtra.c
350 mv cordxtra.o cord/cordxtra.o
352 cord/cordprnt.o: cord $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
353 $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordprnt.c
354 mv cordprnt.o cord/cordprnt.o
356 cord/cordtest: $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a $(UTILS)
358 ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -lucb
359 ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -ldld `./threadlibs`
360 ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
361 ./if_not_there cord/cordtest $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
363 cord/de: $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(UTILS)
365 ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs`
366 ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld `./threadlibs`
367 ./if_mach POWERPC AIX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
368 ./if_mach POWERPC DARWIN $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a
369 ./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
370 ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
371 ./if_mach IA64 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
372 ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
373 ./if_not_there cord/de $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) `./threadlibs`
375 if_mach: $(srcdir)/extra/if_mach.c $(srcdir)/include/private/gcconfig.h
376 $(HOSTCC) $(HOSTCFLAGS) -o if_mach $(srcdir)/extra/if_mach.c
378 threadlibs: $(srcdir)/extra/threadlibs.c $(srcdir)/include/private/gcconfig.h Makefile
379 $(HOSTCC) $(HOSTCFLAGS) -o threadlibs $(srcdir)/extra/threadlibs.c
381 if_not_there: $(srcdir)/extra/if_not_there.c
382 $(HOSTCC) $(HOSTCFLAGS) -o if_not_there $(srcdir)/extra/if_not_there.c
385 rm -f gc.a *.o *.exe tests/*.o gctest gctest_dyn_link test_cpp \
386 setjmp_test mon.out gmon.out a.out core if_not_there if_mach \
387 threadlibs $(CORD_OBJS) cord/cordtest cord/de
390 gctest: tests/test.o gc.a $(UTILS)
392 ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -lucb
393 ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -ldld `./threadlibs`
394 ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o gctest tests/test.o gc.a `./threadlibs`
395 ./if_not_there gctest $(CC) $(CFLAGS) -o gctest tests/test.o gc.a `./threadlibs`
397 # If an optimized setjmp_test generates a segmentation fault,
398 # odds are your compiler is broken. Gctest may still work.
399 # Try compiling setjmp_t.c unoptimized.
400 setjmp_test: $(srcdir)/extra/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
401 $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/extra/setjmp_t.c
403 test: KandRtest cord/cordtest
406 # Those tests that work even with a K&R C compiler:
407 KandRtest: setjmp_test gctest
411 add_gc_prefix: $(srcdir)/extra/add_gc_prefix.c $(srcdir)/include/gc_version.h
412 $(CC) -o add_gc_prefix $(srcdir)/extra/add_gc_prefix.c
414 gcname: $(srcdir)/extra/gcname.c $(srcdir)/include/gc_version.h
415 $(CC) -o gcname $(srcdir)/extra/gcname.c
417 #We assume this is being done from source directory.
418 dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
419 cp Makefile Makefile.old
420 cp Makefile.direct Makefile
421 CC=$(CC) ./configure_atomic_ops.sh
422 cd $(AO_SRC_DIR); $(MAKE) dist
423 if test $(srcdir)/libatomic_ops = $(AO_SRC_DIR); \
425 mv $(AO_SRC_DIR) $(AO_SRC_DIR).bak ; \
426 tar xvfz $(AO_SRC_DIR).bak/libatomic_ops.tar.gz ; \
428 tar xvfz $(AO_SRC_DIR)/libatomic_ops.tar.gz ; \
432 ./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops > /tmp/gc.tar-files
433 tar cvfh gc.tar `cat /tmp/gc.tar-files`
434 cp gc.tar `./gcname`.tar
444 lint: $(CSRCS) tests/test.c
445 lint -DLINT $(CSRCS) tests/test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall|change in ANSI|improper alignment"
447 # BTL: added to test shared library version of collector.
448 # Currently works only under SunOS5. Requires GC_INIT call from statically
449 # loaded client code.
451 gctest_dyn_link: tests/test.o libgc.so
452 $(CC) -L$(ABSDIR) -R$(ABSDIR) -o gctest_dyn_link tests/test.o -lgc -ldl -lthread
454 gctest_irix_dyn_link: tests/test.o libirixgc.so
455 $(CC) -L$(ABSDIR) -o gctest_irix_dyn_link tests/test.o -lirixgc
457 # The following appear to be dead, especially since libgc_globals.h
458 # is apparently lost.
459 test_dll.o: tests/test.c libgc_globals.h
460 $(CC) $(CFLAGS) -DGC_USE_DLL -c tests/test.c -o test_dll.o
462 test_dll: test_dll.o libgc_dll.a libgc.dll
463 $(CC) test_dll.o -L$(ABSDIR) -lgc_dll -o test_dll
467 # Uncomment the following line to build a GNU win32 DLL
468 # include Makefile.DLLs
470 reserved_namespace: $(SRCS)
471 for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
472 sed s/GC_/_GC_/g < $$file > tmp; \
476 user_namespace: $(SRCS)
477 for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
478 sed s/_GC_/GC_/g < $$file > tmp; \