Annotation of OpenXM_contrib/gc/Makefile, Revision 1.1.1.2
1.1 maekawa 1: # Primary targets:
2: # gc.a - builds basic library
3: # libgc.a - builds library for use with g++ "-fgc-keyword" extension
4: # c++ - adds C++ interface to library
5: # cords - adds cords (heavyweight strings) to library
6: # test - prints porting information, then builds basic version of gc.a,
7: # and runs some tests of collector and cords. Does not add cords or
8: # c++ interface to gc.a
9: # cord/de - builds dumb editor based on cords.
1.1.1.2 ! maekawa 10: ABI_FLAG=
! 11: CC=cc $(ABI_FLAG)
! 12: CXX=g++ $(ABI_FLAG)
! 13: AS=as $(ABI_FLAG)
1.1 maekawa 14: # The above doesn't work with gas, which doesn't run cpp.
15: # Define AS as `gcc -c -x assembler-with-cpp' instead.
16: # Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
17: # if you use something other than the default ABI on your machine.
18:
19: CFLAGS= -O -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -DSILENT
20:
21: # For dynamic library builds, it may be necessary to add flags to generate
22: # PIC code, e.g. -fPIC on Linux.
23:
24: # Setjmp_test may yield overly optimistic results when compiled
25: # without optimization.
26: # -DSILENT disables statistics printing, and improves performance.
1.1.1.2 ! maekawa 27: # -DFIND_LEAK causes GC_find_leak to be initially set.
! 28: # This causes the collector to assume that all inaccessible
1.1 maekawa 29: # objects should have been explicitly deallocated, and reports exceptions.
30: # Finalization and the test program are not usable in this mode.
31: # -DSOLARIS_THREADS enables support for Solaris (thr_) threads.
32: # (Clients should also define SOLARIS_THREADS and then include
33: # gc.h before performing thr_ or dl* or GC_ operations.)
34: # Must also define -D_REENTRANT.
35: # -D_SOLARIS_PTHREADS enables support for Solaris pthreads.
36: # Define SOLARIS_THREADS as well.
37: # -DIRIX_THREADS enables support for Irix pthreads. See README.irix.
1.1.1.2 ! maekawa 38: # -DHPUX_THREADS enables support for HP/UX 11 pthreads.
! 39: # Also requires -D_REENTRANT. See README.hp.
1.1 maekawa 40: # -DLINUX_THREADS enables support for Xavier Leroy's Linux threads.
41: # see README.linux. -D_REENTRANT may also be required.
42: # -DALL_INTERIOR_POINTERS allows all pointers to the interior
43: # of objects to be recognized. (See gc_priv.h for consequences.)
44: # -DSMALL_CONFIG tries to tune the collector for small heap sizes,
45: # usually causing it to use less space in such situations.
46: # Incremental collection no longer works in this case.
47: # -DLARGE_CONFIG tunes the collector for unusually large heaps.
48: # Necessary for heaps larger than about 500 MB on most machines.
49: # Recommended for heaps larger than about 64 MB.
50: # -DDONT_ADD_BYTE_AT_END is meaningful only with
51: # -DALL_INTERIOR_POINTERS. Normally -DALL_INTERIOR_POINTERS
52: # causes all objects to be padded so that pointers just past the end of
53: # an object can be recognized. This can be expensive. (The padding
54: # is normally more than one byte due to alignment constraints.)
55: # -DDONT_ADD_BYTE_AT_END disables the padding.
56: # -DNO_SIGNALS does not disable signals during critical parts of
57: # the GC process. This is no less correct than many malloc
58: # implementations, and it sometimes has a significant performance
59: # impact. However, it is dangerous for many not-quite-ANSI C
60: # programs that call things like printf in asynchronous signal handlers.
61: # -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
62: # have execute permission, i.e. it may be impossible to execute
63: # code from the heap. Currently this only affects the incremental
64: # collector on UNIX machines. It may greatly improve its performance,
65: # since this may avoid some expensive cache synchronization.
66: # -DOPERATOR_NEW_ARRAY declares that the C++ compiler supports the
67: # new syntax "operator new[]" for allocating and deleting arrays.
68: # See gc_cpp.h for details. No effect on the C part of the collector.
69: # This is defined implicitly in a few environments.
70: # -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
71: # as aliases for X, GC_realloc, and GC_free, respectively.
72: # Calloc is redefined in terms of the new malloc. X should
73: # be either GC_malloc or GC_malloc_uncollectable.
74: # The former is occasionally useful for working around leaks in code
75: # you don't want to (or can't) look at. It may not work for
76: # existing code, but it often does. Neither works on all platforms,
77: # since some ports use malloc or calloc to obtain system memory.
78: # (Probably works for UNIX, and win32.)
79: # -DIGNORE_FREE turns calls to free into a noop. Only useful with
80: # -DREDIRECT_MALLOC.
81: # -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
82: # Reduces code size slightly at the expense of debuggability.
83: # -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
84: # order by specifying a nonstandard finalization mark procedure (see
85: # finalize.c). Objects reachable from finalizable objects will be marked
86: # in a sepearte postpass, and hence their memory won't be reclaimed.
87: # Not recommended unless you are implementing a language that specifies
1.1.1.2 ! maekawa 88: # these semantics. Since 5.0, determines only only the initial value
! 89: # of GC_java_finalization variable.
1.1 maekawa 90: # -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
91: # to explicit GC_invoke_finalizers() calls.
1.1.1.2 ! maekawa 92: # In 5.0 this became runtime adjustable, and this only determines the
! 93: # initial value of GC_finalize_on_demand.
1.1 maekawa 94: # -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
95: # This is useful if either the vendor malloc implementation is poor,
96: # or if REDIRECT_MALLOC is used.
97: # -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
98: # sets the heap block size. Each heap block is devoted to a single size and
99: # kind of object. For the incremental collector it makes sense to match
100: # the most likely page size. Otherwise large values result in more
101: # fragmentation, but generally better performance for large heaps.
102: # -DUSE_MMAP use MMAP instead of sbrk to get new memory.
103: # Works for Solaris and Irix.
1.1.1.2 ! maekawa 104: # -DUSE_MUNMAP causes memory to be returned to the OS under the right
! 105: # circumstances. This currently disables VM-based incremental collection.
! 106: # This is currently experimental, and works only under some Unix and
! 107: # Linux versions.
1.1 maekawa 108: # -DMMAP_STACKS (for Solaris threads) Use mmap from /dev/zero rather than
109: # GC_scratch_alloc() to get stack memory.
110: # -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
111: # the garbage collector detects a value that looks almost, but not quite,
112: # like a pointer, print both the address containing the value, and the
113: # value of the near-bogus-pointer. Can be used to identifiy regions of
114: # memory that are likely to contribute misidentified pointers.
115: # -DOLD_BLOCK_ALLOC Use the old, possibly faster, large block
116: # allocation strategy. The new strategy tries harder to minimize
117: # fragmentation, sometimes at the expense of spending more time in the
118: # large block allocator and/or collecting more frequently.
1.1.1.2 ! maekawa 119: # If you expect the allocator to promptly use an explicitly expanded
1.1 maekawa 120: # heap, this is highly recommended.
1.1.1.2 ! maekawa 121: # -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
! 122: # for objects allocated with the debugging allocator. If all objects
! 123: # through GC_MALLOC with GC_DEBUG defined, this allows the client
! 124: # to determine how particular or randomly chosen objects are reachable
! 125: # for debugging/profiling purposes. The backptr.h interface is
! 126: # implemented only if this is defined.
! 127: # -DGC_ASSERTIONS Enable some internal GC assertion checking. Currently
! 128: # this facility is only used in a few places. It is intended primarily
! 129: # for debugging of the garbage collector itself, but could also
! 130: # occasionally be useful for debugging of client code. Slows down the
! 131: # collector somewhat, but not drastically.
! 132: # -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
! 133: # altered stubborn objects, at substantial performance cost.
! 134: # Use only for debugging of the incremental collector.
1.1 maekawa 135: #
136:
137:
138: LIBGC_CFLAGS= -O -DNO_SIGNALS -DSILENT \
139: -DREDIRECT_MALLOC=GC_malloc_uncollectable \
140: -DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
141: # Flags for building libgc.a -- the last two are required.
142:
143: CXXFLAGS= $(CFLAGS)
144: AR= ar
145: RANLIB= ranlib
146:
147:
148: # Redefining srcdir allows object code for the nonPCR version of the collector
149: # to be generated in different directories. In this case, the destination directory
150: # should contain a copy of the original include directory.
151: srcdir = .
152: VPATH = $(srcdir)
153:
1.1.1.2 ! maekawa 154: OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o hpux_irix_threads.o linux_threads.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o
1.1 maekawa 155:
1.1.1.2 ! maekawa 156: CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c hpux_irix_threads.c linux_threads.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c
1.1 maekawa 157:
158: CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c cord/cord.h cord/ec.h cord/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC cord/SCOPTIONS.amiga cord/SMakefile.amiga
159:
160: CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
161:
162: SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.s \
163: sparc_mach_dep.s gc.h gc_typed.h gc_hdrs.h gc_priv.h gc_private.h \
164: gcconfig.h gc_mark.h include/gc_inl.h include/gc_inline.h gc.man \
165: threadlibs.c if_mach.c if_not_there.c gc_cpp.cc gc_cpp.h weakpointer.h \
166: gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h gc_alloc.h \
167: include/new_gc_alloc.h include/javaxfc.h sparc_sunos4_mach_dep.s \
1.1.1.2 ! maekawa 168: solaris_threads.h backptr.h hpux_test_and_clear.s $(CORD_SRCS)
1.1 maekawa 169:
170: OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
171: README test.c test_cpp.cc setjmp_t.c SMakefile.amiga \
172: SCoptions.amiga README.amiga README.win32 cord/README \
173: cord/gc.h include/gc.h include/gc_typed.h include/cord.h \
174: include/ec.h include/private/cord_pos.h include/private/gcconfig.h \
175: include/private/gc_hdrs.h include/private/gc_priv.h \
1.1.1.2 ! maekawa 176: include/gc_cpp.h README.rs6000 include/backptr.h \
1.1 maekawa 177: include/weakpointer.h README.QUICK callprocs pc_excludes \
178: barrett_diagram README.OS2 README.Mac MacProjects.sit.hqx \
179: MacOS.c EMX_MAKEFILE makefile.depend README.debugging \
180: include/gc_cpp.h Mac_files/datastart.c Mac_files/dataend.c \
181: Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
182: add_gc_prefix.c README.solaris2 README.sgi README.hp README.uts \
183: win32_threads.c NT_THREADS_MAKEFILE gc.mak README.dj Makefile.dj \
184: README.alpha README.linux version.h Makefile.DLLs \
1.1.1.2 ! maekawa 185: WCC_MAKEFILE nursery.c include/gc_nursery.h include/gc_copy_descr.h \
! 186: include/leak_detector.h
1.1 maekawa 187:
188: CORD_INCLUDE_FILES= $(srcdir)/gc.h $(srcdir)/cord/cord.h $(srcdir)/cord/ec.h \
189: $(srcdir)/cord/private/cord_pos.h
190:
191: UTILS= if_mach if_not_there threadlibs
192:
193: # Libraries needed for curses applications. Only needed for de.
194: CURSES= -lcurses -ltermlib
195:
196: # The following is irrelevant on most systems. But a few
197: # versions of make otherwise fork the shell specified in
198: # the SHELL environment variable.
199: SHELL= /bin/sh
200:
201: SPECIALCFLAGS =
202: # Alternative flags to the C compiler for mach_dep.c.
203: # Mach_dep.c often doesn't like optimization, and it's
204: # not time-critical anyway.
205: # Set SPECIALCFLAGS to -q nodirect_code on Encore.
206:
207: all: gc.a gctest
208:
209: pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h gcconfig.h mach_dep.o $(SRCS)
210: make -f PCR-Makefile depend
211: make -f PCR-Makefile
212:
213: $(OBJS) test.o dyn_load.o dyn_load_sunos53.o: $(srcdir)/gc_priv.h $(srcdir)/gc_hdrs.h $(srcdir)/gc.h \
214: $(srcdir)/gcconfig.h $(srcdir)/gc_typed.h Makefile
215: # The dependency on Makefile is needed. Changing
216: # options such as -DSILENT affects the size of GC_arrays,
217: # invalidating all .o files that rely on gc_priv.h
218:
219: mark.o typd_mlc.o finalize.o: $(srcdir)/gc_mark.h
220:
221: base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
222: echo > base_lib
1.1.1.2 ! maekawa 223: rm -f dont_ar_1
! 224: ./if_mach SPARC SUNOS5 touch dont_ar_1
1.1 maekawa 225: ./if_mach SPARC SUNOS5 $(AR) rus gc.a $(OBJS) dyn_load.o
1.1.1.2 ! maekawa 226: ./if_mach M68K AMIGA touch dont_ar_1
! 227: ./if_mach M68K AMIGA $(AR) -vrus gc.a $(OBJS) dyn_load.o
! 228: ./if_not_there dont_ar_1 $(AR) ru gc.a $(OBJS) dyn_load.o
! 229: ./if_not_there dont_ar_1 $(RANLIB) gc.a || cat /dev/null
1.1 maekawa 230: # ignore ranlib failure; that usually means it doesn't exist, and isn't needed
231:
232: cords: $(CORD_OBJS) cord/cordtest $(UTILS)
1.1.1.2 ! maekawa 233: rm -f dont_ar_3
! 234: ./if_mach SPARC SUNOS5 touch dont_ar_3
1.1 maekawa 235: ./if_mach SPARC SUNOS5 $(AR) rus gc.a $(CORD_OBJS)
1.1.1.2 ! maekawa 236: ./if_mach M68K AMIGA touch dont_ar_3
! 237: ./if_mach M68K AMIGA $(AR) -vrus gc.a $(CORD_OBJS)
! 238: ./if_not_there dont_ar_3 $(AR) ru gc.a $(CORD_OBJS)
! 239: ./if_not_there dont_ar_3 $(RANLIB) gc.a || cat /dev/null
1.1 maekawa 240:
241: gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/gc_cpp.h $(srcdir)/gc.h Makefile
242: $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
243:
244: test_cpp: $(srcdir)/test_cpp.cc $(srcdir)/gc_cpp.h gc_cpp.o $(srcdir)/gc.h \
245: base_lib $(UTILS)
246: rm -f test_cpp
1.1.1.2 ! maekawa 247: ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
1.1 maekawa 248: ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
249:
250: c++: gc_cpp.o $(srcdir)/gc_cpp.h test_cpp
1.1.1.2 ! maekawa 251: rm -f dont_ar_4
! 252: ./if_mach SPARC SUNOS5 touch dont_ar_4
1.1 maekawa 253: ./if_mach SPARC SUNOS5 $(AR) rus gc.a gc_cpp.o
1.1.1.2 ! maekawa 254: ./if_mach M68K AMIGA touch dont_ar_4
! 255: ./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
! 256: ./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
! 257: ./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
1.1 maekawa 258: ./test_cpp 1
259: echo > c++
260:
261: dyn_load_sunos53.o: dyn_load.c
262: $(CC) $(CFLAGS) -DSUNOS53_SHARED_LIB -c $(srcdir)/dyn_load.c -o $@
263:
264: # SunOS5 shared library version of the collector
265: sunos5gc.so: $(OBJS) dyn_load_sunos53.o
266: $(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o -ldl
267: ln sunos5gc.so libgc.so
268:
269: # Alpha/OSF shared library version of the collector
270: libalphagc.so: $(OBJS)
271: ld -shared -o libalphagc.so $(OBJS) dyn_load.o -lc
272: ln libalphagc.so libgc.so
273:
274: # IRIX shared library version of the collector
275: libirixgc.so: $(OBJS) dyn_load.o
276: ld -shared $(ABI_FLAG) -o libirixgc.so $(OBJS) dyn_load.o -lc
277: ln libirixgc.so libgc.so
278:
279: # Linux shared library version of the collector
280: liblinuxgc.so: $(OBJS) dyn_load.o
281: gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o -lo
282: ln liblinuxgc.so libgc.so
283:
284: # Alternative Linux rule. This is preferable, but is likely to break the
285: # Makefile for some non-linux platforms.
286: # LIBOBJS= $(patsubst %.o, %.lo, $(OBJS))
287: #
288: #.SUFFIXES: .lo $(SUFFIXES)
289: #
290: #.c.lo:
291: # $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@
292: #
293: # liblinuxgc.so: $(LIBOBJS) dyn_load.lo
294: # gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo
295: # touch liblinuxgc.so
296:
297: mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s $(srcdir)/mips_ultrix_mach_dep.s $(srcdir)/rs6000_mach_dep.s $(UTILS)
298: rm -f mach_dep.o
299: ./if_mach MIPS IRIX5 $(AS) -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.s
300: ./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s
301: ./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s
302: ./if_mach RS6000 "" $(AS) -o mach_dep.o $(srcdir)/rs6000_mach_dep.s
303: ./if_mach ALPHA "" $(AS) -o mach_dep.o $(srcdir)/alpha_mach_dep.s
304: ./if_mach SPARC SUNOS5 $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.s
305: ./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
1.1.1.2 ! maekawa 306: ./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
! 307: ./if_mach HP_PA HPUX $(AS) -o hpux_test_and_clear.o $(srcdir)/hpux_test_and_clear.s
! 308: ./if_mach HP_PA HPUX $(CC) -c -o md_tmp.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
! 309: ./if_mach HP_PA HPUX ld -r -o mach_dep.o md_tmp.o hpux_test_and_clear.o
1.1 maekawa 310: ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
311:
1.1.1.2 ! maekawa 312: mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
1.1 maekawa 313: rm -f mark_rts.o
314: -./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
315: ./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
316: # Work-around for DEC optimizer tail recursion elimination bug.
317: # The ALPHA-specific line should be removed if gcc is used.
318:
319: alloc.o: version.h
320:
321: cord/cordbscs.o: $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
322: $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
323: mv cordbscs.o cord/cordbscs.o
324: # not all compilers understand -o filename
325:
326: cord/cordxtra.o: $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
327: $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordxtra.c
328: mv cordxtra.o cord/cordxtra.o
329:
330: cord/cordprnt.o: $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
331: $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordprnt.c
332: mv cordprnt.o cord/cordprnt.o
333:
334: cord/cordtest: $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a $(UTILS)
335: rm -f cord/cordtest
336: ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -lucb
1.1.1.2 ! maekawa 337: ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -ldld `./threadlibs`
1.1 maekawa 338: ./if_not_there cord/cordtest $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
339:
340: cord/de: $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(UTILS)
341: rm -f cord/de
342: ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs`
1.1.1.2 ! maekawa 343: ./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`
1.1 maekawa 344: ./if_mach RS6000 "" $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
345: ./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
346: ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
1.1.1.2 ! maekawa 347: ./if_mach M68K AMIGA $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
1.1 maekawa 348: ./if_not_there cord/de $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) `./threadlibs`
349:
350: if_mach: $(srcdir)/if_mach.c $(srcdir)/gcconfig.h
351: $(CC) $(CFLAGS) -o if_mach $(srcdir)/if_mach.c
352:
353: threadlibs: $(srcdir)/threadlibs.c $(srcdir)/gcconfig.h Makefile
354: $(CC) $(CFLAGS) -o threadlibs $(srcdir)/threadlibs.c
355:
356: if_not_there: $(srcdir)/if_not_there.c
357: $(CC) $(CFLAGS) -o if_not_there $(srcdir)/if_not_there.c
358:
359: clean:
360: rm -f gc.a *.o gctest gctest_dyn_link test_cpp \
361: setjmp_test mon.out gmon.out a.out core if_not_there if_mach \
362: threadlibs $(CORD_OBJS) cord/cordtest cord/de
363: -rm -f *~
364:
1.1.1.2 ! maekawa 365: gctest: test.o gc.a $(UTILS)
1.1 maekawa 366: rm -f gctest
367: ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest test.o gc.a -lucb
1.1.1.2 ! maekawa 368: ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o gctest test.o gc.a -ldld `./threadlibs`
1.1 maekawa 369: ./if_not_there gctest $(CC) $(CFLAGS) -o gctest test.o gc.a `./threadlibs`
370:
371: # If an optimized setjmp_test generates a segmentation fault,
372: # odds are your compiler is broken. Gctest may still work.
373: # Try compiling setjmp_t.c unoptimized.
1.1.1.2 ! maekawa 374: setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/gc.h $(UTILS)
1.1 maekawa 375: $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
376:
377: test: KandRtest cord/cordtest
378: cord/cordtest
379:
380: # Those tests that work even with a K&R C compiler:
381: KandRtest: setjmp_test gctest
382: ./setjmp_test
383: ./gctest
384:
385: add_gc_prefix: add_gc_prefix.c
386: $(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
387:
388: gc.tar: $(SRCS) $(OTHER_FILES) add_gc_prefix
389: ./add_gc_prefix $(SRCS) $(OTHER_FILES) > /tmp/gc.tar-files
1.1.1.2 ! maekawa 390: tar cvfh gc.tar `cat /tmp/gc.tar-files`
1.1 maekawa 391:
392: pc_gc.tar: $(SRCS) $(OTHER_FILES)
393: tar cvfX pc_gc.tar pc_excludes $(SRCS) $(OTHER_FILES)
394:
395: floppy: pc_gc.tar
396: -mmd a:/cord
397: -mmd a:/cord/private
398: -mmd a:/include
399: -mmd a:/include/private
400: mkdir /tmp/pc_gc
401: cat pc_gc.tar | (cd /tmp/pc_gc; tar xvf -)
402: -mcopy -tmn /tmp/pc_gc/* a:
403: -mcopy -tmn /tmp/pc_gc/cord/* a:/cord
404: -mcopy -mn /tmp/pc_gc/cord/de_win.ICO a:/cord
405: -mcopy -tmn /tmp/pc_gc/cord/private/* a:/cord/private
406: -mcopy -tmn /tmp/pc_gc/include/* a:/include
407: -mcopy -tmn /tmp/pc_gc/include/private/* a:/include/private
408: rm -r /tmp/pc_gc
409:
410: gc.tar.Z: gc.tar
411: compress gc.tar
412:
413: gc.tar.gz: gc.tar
414: gzip gc.tar
415:
416: lint: $(CSRCS) test.c
417: lint -DLINT $(CSRCS) test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall|change in ANSI|improper alignment"
418:
419: # BTL: added to test shared library version of collector.
420: # Currently works only under SunOS5. Requires GC_INIT call from statically
421: # loaded client code.
422: ABSDIR = `pwd`
423: gctest_dyn_link: test.o libgc.so
424: $(CC) -L$(ABSDIR) -R$(ABSDIR) -o gctest_dyn_link test.o -lgc -ldl -lthread
425:
426: gctest_irix_dyn_link: test.o libirixgc.so
427: $(CC) -L$(ABSDIR) -o gctest_irix_dyn_link test.o -lirixgc
428:
429: test_dll.o: test.c libgc_globals.h
430: $(CC) $(CFLAGS) -DGC_USE_DLL -c test.c -o test_dll.o
431:
432: test_dll: test_dll.o libgc_dll.a libgc.dll
433: $(CC) test_dll.o -L$(ABSDIR) -lgc_dll -o test_dll
434:
435: SYM_PREFIX-libgc=GC
436:
437: # Uncomment the following line to build a GNU win32 DLL
438: # include Makefile.DLLs
439:
440: reserved_namespace: $(SRCS)
441: for file in $(SRCS) test.c test_cpp.cc; do \
442: sed s/GC_/_GC_/g < $$file > tmp; \
443: cp tmp $$file; \
444: done
445:
446: user_namespace: $(SRCS)
447: for file in $(SRCS) test.c test_cpp.cc; do \
448: sed s/_GC_/GC_/g < $$file > tmp; \
449: cp tmp $$file; \
450: done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>