2 # Rewritten smakefile for amiga / sas/c. -Kjetil M.
3 # Dont use the cord-package if you define parm=both or parm=reg.
6 #----------------TOOLS--------------------------------
11 #----------------CPU OPTIONS--------------------------
15 #----------------FPU OPTIONS--------------------------
18 MATHLIB=LIB:scm881.lib
20 #----------------COMPILER OPTIONS---------------------
22 IGNORE= IGNORE=85 IGNORE=154 IGNORE=161 IGNORE=100
24 OPTIMIZE=optimize optimizetime optglobal optimizerdepth=100 optimizerpeephole optloop OPTSCHED optimizerinlocal optimizerrecurdepth=100
25 # optimizerinline optimizercomplexity=100
27 OPT= $(OPTIMIZE) CPU=$(CPU) math=$(MATH) NOSTACKCHECK VERBOSE \
28 MAPHUNK NOVERSION NOICONS nodebug \
34 SOPT= $(OPT) $(IGNORE) \
35 DEFINE AMIGA_SKIP_SEG \
36 DEFINE ATOMIC_UNCOLLECTABLE \
37 DEFINE GC_AMIGA_FASTALLOC \
38 DEFINE GC_AMIGA_RETRY \
39 DEFINE GC_AMIGA_PRINTSTATS \
43 #DEFINE ALL_INTERIOR_POINTERS \
46 SCOPT= $(SOPT) define GC_AMIGA_MAKINGLIB
48 CSCOPT= $(OPT) DEFINE AMIGA IGNORE=100 IGNORE=161
50 #------------------LINKING----------------------------
53 all: gctest setjmp_t cord/cordtest
56 delete *.lib gctest setjmp_t *.o *.lnk cord/*.o cord/*.lib cord/*.lnk cord/cordtest
59 test: setjmp_t gctest cord/cordtest
64 gctest: gc$(CPU).lib GCAmigaOS$(CPU).lib test.o
65 $(LINKER) LIB:c.o test.o TO gctest LIB gc$(CPU).lib LIB:sc.lib $(MATHLIB)
67 setjmp_t: setjmp_t.o gc.h
68 $(LINKER) LIB:c.o setjmp_t.o to setjmp_t lib LIB:sc.lib
70 cord/cordtest: cord/cordtest.o cord/cord$(CPU).lib gc$(CPU).lib
71 slink LIB:c.o cord/cordtest.o LIB $(MATHLIB) gc$(CPU).lib cord/cord$(CPU).lib LIB:sc.lib TO cord/cordtest
74 #------------------LIBBING----------------------------
76 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 real_malloc.o dyn_load.o dbg_mlc.o malloc.o stubborn.o checksums.o typd_mlc.o ptr_chck.o mallocx.o
79 $(LIBER) gc$(CPU).lib r $(OBJS)
82 COBJS = cord/cordbscs.o cord/cordprnt.o cord/cordxtra.o
84 cord/cord$(CPU).lib: $(COBJS)
85 oml cord/cord$(CPU).lib r $(COBJS)
87 #------------------COMPILING--------------------------
89 INC= gc_private.h gc_hdrs.h gc.h gcconfig.h
91 alloc.o : alloc.c $(INC)
92 $(CC) alloc.c $(SCOPT) ignore=7
94 reclaim.o : reclaim.c $(INC)
95 $(CC) reclaim.c $(SCOPT)
97 allchblk.o : allchblk.c $(INC)
98 $(CC) allchblk.c $(SCOPT)
100 misc.o : misc.c $(INC)
101 $(CC) misc.c $(SCOPT)
103 os_dep.o : os_dep.c $(INC) AmigaOS.c
104 $(CC) os_dep.c $(SCOPT)
106 mark_rts.o : mark_rts.c $(INC)
107 $(CC) mark_rts.c $(SCOPT)
109 headers.o : headers.c $(INC)
110 $(CC) headers.c $(SCOPT)
112 mark.o : mark.c $(INC)
113 $(CC) mark.c $(SCOPT)
115 obj_map.o : obj_map.c $(INC)
116 $(CC) obj_map.c $(SCOPT)
118 blacklst.o : blacklst.c $(INC)
119 $(CC) blacklst.c $(SCOPT)
121 finalize.o : finalize.c $(INC)
122 $(CC) finalize.c $(SCOPT) noopt #Could sas/c still have problems with this one? Gctest sometimes fails to finalize all.
124 new_hblk.o : new_hblk.c $(INC)
125 $(CC) new_hblk.c $(SCOPT)
127 real_malloc.o : real_malloc.c $(INC)
128 $(CC) real_malloc.c $(SCOPT)
130 dyn_load.o : dyn_load.c $(INC)
131 $(CC) dyn_load.c $(SCOPT)
133 dbg_mlc.o : dbg_mlc.c $(INC)
134 $(CC) dbg_mlc.c $(SCOPT)
136 malloc.o : malloc.c $(INC)
137 $(CC) malloc.c $(SCOPT)
139 mallocx.o : mallocx.c $(INC)
140 $(CC) mallocx.c $(SCOPT)
142 stubborn.o : stubborn.c $(INC)
143 $(CC) stubborn.c $(SCOPT)
145 checksums.o : checksums.c $(INC)
146 $(CC) checksums.c $(SCOPT)
148 typd_mlc.o: typd_mlc.c $(INC)
149 $(CC) typd_mlc.c $(SCOPT)
151 mach_dep.o : mach_dep.c $(INC)
152 $(CC) mach_dep.c $(SCOPT)
154 ptr_chck.o: ptr_chck.c $(INC)
155 $(CC) ptr_chck.c $(SCOPT)
157 test.o : test.c $(INC)
160 setjmp_t: setjmp_t.c gc.h
161 $(CC) setjmp_t.c $(SOPT)
166 cord/cordbscs.o: cord/cordbscs.c
167 sc cord/cordbscs.c $(CSCOPT)
169 cord/cordprnt.o: cord/cordprnt.c
170 sc cord/cordprnt.c $(CSCOPT)
172 cord/cordxtra.o: cord/cordxtra.c
173 sc cord/cordxtra.c $(CSCOPT)
175 cord/cordtest.o: cord/cordtest.c
176 sc cord/cordtest.c $(CSCOPT)