forked from ivmai/bdwgc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SMakefile.amiga
172 lines (109 loc) · 3.89 KB
/
SMakefile.amiga
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Rewritten smakefile for amiga / sas/c. -Kjetil M.
# Don't use the cord-package if you define parm=both or parm=reg.
#----------------TOOLS--------------------------------
CC=sc
LINKER=slink
LIBER=oml
#----------------CPU OPTIONS--------------------------
CPU=68060
#----------------FPU OPTIONS--------------------------
MATH=8
MATHLIB=LIB:scm881.lib
#----------------COMPILER OPTIONS---------------------
IGNORE= IGNORE=85 IGNORE=154 IGNORE=161 IGNORE=100
OPTIMIZE=optimize optimizetime optglobal optimizerdepth=100 optimizerpeephole optloop OPTSCHED optimizerinlocal optimizerrecurdepth=100
# optimizerinline optimizercomplexity=100
OPT= $(OPTIMIZE) CPU=$(CPU) math=$(MATH) NOSTACKCHECK VERBOSE \
MAPHUNK NOVERSION NOICONS nodebug \
parm=reg \
DEFINE __USE_SYSBASE
SOPT= $(OPT) $(IGNORE) \
DEFINE AMIGA_SKIP_SEG \
DEFINE GC_ATOMIC_UNCOLLECTABLE \
DEFINE GC_AMIGA_FASTALLOC \
DEFINE GC_AMIGA_RETRY \
DEFINE GC_AMIGA_PRINTSTATS \
DEFINE GC_AMIGA_GC
#DEFINE ALL_INTERIOR_POINTERS \
SCOPT= $(SOPT) define GC_AMIGA_MAKINGLIB
CSCOPT= $(OPT) DEFINE AMIGA IGNORE=100 IGNORE=161
#------------------LINKING----------------------------
all: gctest setjmp_t cord/cordtest
clean:
delete *.lib gctest setjmp_t *.o *.lnk cord/*.o cord/*.lib cord/*.lnk cord/cordtest
smake
test: setjmp_t gctest cord/cordtest
setjmp_t
gctest
cord/cordtest
gctest: gc$(CPU).lib GCAmigaOS$(CPU).lib test.o
$(LINKER) LIB:c.o test.o TO gctest LIB gc$(CPU).lib LIB:sc.lib $(MATHLIB)
setjmp_t: setjmp_t.o gc.h
$(LINKER) LIB:c.o setjmp_t.o to setjmp_t lib LIB:sc.lib
cord/cordtest: cord/cordtest.o cord/cord$(CPU).lib gc$(CPU).lib
slink LIB:c.o cord/cordtest.o LIB $(MATHLIB) gc$(CPU).lib cord/cord$(CPU).lib LIB:sc.lib TO cord/cordtest
#------------------LIBBING----------------------------
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 dyn_load.o dbg_mlc.o malloc.o checksums.o typd_mlc.o ptr_chck.o mallocx.o fnlz_mlc.o
gc$(CPU).lib: $(OBJS)
$(LIBER) gc$(CPU).lib r $(OBJS)
COBJS = cord/cordbscs.o cord/cordprnt.o cord/cordxtra.o
cord/cord$(CPU).lib: $(COBJS)
oml cord/cord$(CPU).lib r $(COBJS)
#------------------COMPILING--------------------------
INC= gc_private.h gc_hdrs.h gc.h gcconfig.h
alloc.o : alloc.c $(INC)
$(CC) alloc.c $(SCOPT) ignore=7
reclaim.o : reclaim.c $(INC)
$(CC) reclaim.c $(SCOPT)
allchblk.o : allchblk.c $(INC)
$(CC) allchblk.c $(SCOPT)
misc.o : misc.c $(INC)
$(CC) misc.c $(SCOPT)
os_dep.o : os_dep.c $(INC) extra/AmigaOS.c
$(CC) os_dep.c $(SCOPT)
mark_rts.o : mark_rts.c $(INC)
$(CC) mark_rts.c $(SCOPT)
headers.o : headers.c $(INC)
$(CC) headers.c $(SCOPT)
mark.o : mark.c $(INC)
$(CC) mark.c $(SCOPT)
obj_map.o : obj_map.c $(INC)
$(CC) obj_map.c $(SCOPT)
blacklst.o : blacklst.c $(INC)
$(CC) blacklst.c $(SCOPT)
finalize.o : finalize.c $(INC)
$(CC) finalize.c $(SCOPT) noopt
# Could sas/c still have problems with this one? Gctest sometimes fails to finalize all.
new_hblk.o : new_hblk.c $(INC)
$(CC) new_hblk.c $(SCOPT)
dyn_load.o : dyn_load.c $(INC)
$(CC) dyn_load.c $(SCOPT)
dbg_mlc.o : dbg_mlc.c $(INC)
$(CC) dbg_mlc.c $(SCOPT)
fnlz_mlc.o : fnlz_mlc.c $(INC)
$(CC) fnlz_mlc.c $(SCOPT)
malloc.o : malloc.c $(INC)
$(CC) malloc.c $(SCOPT)
mallocx.o : mallocx.c $(INC)
$(CC) mallocx.c $(SCOPT)
checksums.o : checksums.c $(INC)
$(CC) checksums.c $(SCOPT)
typd_mlc.o: typd_mlc.c $(INC)
$(CC) typd_mlc.c $(SCOPT)
mach_dep.o : mach_dep.c $(INC)
$(CC) mach_dep.c $(SCOPT)
ptr_chck.o: ptr_chck.c $(INC)
$(CC) ptr_chck.c $(SCOPT)
test.o : test.c $(INC)
$(CC) test.c $(SOPT)
setjmp_t: tools/setjmp_t.c gc.h
$(CC) tools/setjmp_t.c $(SOPT)
# cords:
cord/cordbscs.o: cord/cordbscs.c
sc cord/cordbscs.c $(CSCOPT)
cord/cordprnt.o: cord/cordprnt.c
sc cord/cordprnt.c $(CSCOPT)
cord/cordxtra.o: cord/cordxtra.c
sc cord/cordxtra.c $(CSCOPT)
cord/cordtest.o: cord/tests/cordtest.c
sc cord/tests/cordtest.c $(CSCOPT)