mescc: Support regular C99 compile, headers + mlibc.
[mes.git] / scaffold / scaffold.make
1 TARGET:=m
2 C_FILES:=$(DIR)/m.c
3 DEFINES:=POSIX=1
4 INCLUDES:=libc
5 include make/bin.make
6
7 TARGET:=m
8 EXPECT:=255
9 include make/check.make
10
11 TARGET:=hello
12 C_FILES:=$(DIR)/hello.c
13 DEFINES:=POSIX=1
14 INCLUDES:=libc
15 include make/bin.make
16
17 TARGET:=hello
18 EXPECT:=42
19 include make/check.make
20
21 TARGET:=t
22 C_FILES:=$(DIR)/t.c
23 DEFINES:=POSIX=1
24 INCLUDES:=libc
25 include make/bin.make
26
27 TARGET:=t
28 include make/check.make
29
30 TARGET:=m.mlibc
31 C_FILES:=$(DIR)/m.c
32 include make/bin-mlibc.make
33
34 TARGET:=m.mlibc
35 EXPECT:=255
36 include make/check.make
37
38 TARGET:=hello.mlibc
39 C_FILES:=$(DIR)/hello.c
40 include make/bin-mlibc.make
41
42 TARGET:=hello.mlibc
43 EXPECT:=42
44 include make/check.make
45
46 TARGET:=micro-mes.mlibc
47 C_FILES:=$(DIR)/micro-mes.c
48 include make/bin-mlibc.make
49
50 TEST:=micro-mes.mlibc-check
51 $(TEST): $(OUT)/micro-mes.mlibc
52         $< 2 3; r=$$?; [ $$r = 3 ]
53 include make/check.make
54
55 TARGET:=tiny-mes.mlibc
56 C_FILES:=$(DIR)/tiny-mes.c
57 include make/bin-mlibc.make
58
59 TARGET:=tiny-mes.mlibc
60 include make/check.make
61
62 TARGET:=cons-mes.mlibc
63 C_FILES:=$(DIR)/cons-mes.c
64 DEFINES:=VERSION='"$(VERSION)"'
65 include make/bin-mlibc.make
66
67 TARGET:=cons-mes.mlibc
68 include make/check.make
69
70 TARGET:=t.mlibc
71 C_FILES:=$(DIR)/t.c
72 include make/bin-mlibc.make
73
74 TARGET:=t.mlibc
75 include make/check.make
76
77 CROSS:=$(CC32:%gcc=%)
78 #$(OUT)/$(DIR)/mini-mes.$(CROSS)o: $(SNARF.MES)
79 $(OUT)/mini-mes: $(SNARF.MES)
80
81 TARGET:=mini-mes.mlibc
82 C_FILES:=$(DIR)/mini-mes.c
83 DEFINES:=FIXED_PRIMITIVES=1 VERSION='"$(VERSION)"' MODULEDIR='"$(MODULEDIR)"' PREFIX='"$(PREFIX)"'
84 INCLUDES:=src $(OUT)/src
85 include make/bin-mlibc.make
86
87 TEST:=mini-mes.mlibc-check
88 $(TEST): $(OUT)/mini-mes.mlibc
89         echo 0 | $<
90 include make/check.make
91
92 # guile/mescc.scm
93
94 TARGET:=m.guile
95 C_FILES:=$(DIR)/m.c
96 include make/mescc-guile.make
97
98 TARGET:=m.guile
99 EXPECT:=255
100 include make/check.make
101
102 TARGET:=hello.guile
103 C_FILES:=$(DIR)/hello.c
104 include make/mescc-guile.make
105
106 TARGET:=hello.guile
107 EXPECT:=42
108 include make/check.make
109
110 TARGET:=micro-mes.guile
111 C_FILES:=$(DIR)/micro-mes.c
112 include make/mescc-guile.make
113
114 TEST:=micro-mes.guile-check
115 $(TEST): $(OUT)/micro-mes.guile
116         $< 2 3; r=$$?; [ $$r = 3 ]
117 include make/check.make
118
119 $(OUT)/tiny-mes.mes: module/mes/tiny-0-32.mo
120 TARGET:=tiny-mes.guile
121 C_FILES:=$(DIR)/tiny-mes.c
122 include make/mescc-guile.make
123
124 TARGET:=tiny-mes.guile
125 include make/check.make
126
127 TARGET:=cons-mes.guile
128 C_FILES:=$(DIR)/cons-mes.c
129 include make/mescc-guile.make
130
131 TARGET:=cons-mes.guile
132 include make/check.make
133
134 TARGET:=t.guile
135 C_FILES:=$(DIR)/t.c
136 include make/mescc-guile.make
137
138 TARGET:=t.guile
139 include make/check.make
140
141 $(OUT)/mini-mes.guile: module/mes/read-0-32.mo
142 TARGET:=mini-mes.guile
143 C_FILES:=$(DIR)/mini-mes.c
144 include make/mescc-guile.make
145
146 TEST:=mini-mes.guile-check
147 $(TEST): $(OUT)/mini-mes.guile
148         echo 0 | $<
149 include make/check.make
150
151 # scripts/mescc.mes
152 ifeq ($(MES_SKIP_MES),)
153 TARGET:=m.mes
154 C_FILES:=$(DIR)/m.c
155 include make/mescc-mes.make
156
157 TARGET:=m.mes
158 EXPECT:=255
159 include make/check.make
160
161 ifneq ($(SCAFFOLD),)
162 TARGET:=hello.mes
163 C_FILES:=$(DIR)/hello.c
164 include make/mescc-mes.make
165
166 TARGET:=hello.mes
167 EXPECT:=42
168 include make/check.make
169
170 TARGET:=micro-mes.mes
171 C_FILES:=$(DIR)/micro-mes.c
172 include make/mescc-mes.make
173
174 TEST:=micro-mes.mes-check
175 $(TEST): $(OUT)/micro-mes.mes
176         $< 2 3; r=$$?; [ $$r = 3 ]
177 include make/check.make
178
179 $(OUT)/tiny-mes.mes: module/mes/tiny-0-32.mo
180 TARGET:=tiny-mes.mes
181 C_FILES:=$(DIR)/tiny-mes.c
182 include make/mescc-mes.make
183
184 TARGET:=tiny-mes.mes
185 include make/check.make
186
187 TARGET:=cons-mes.mes
188 C_FILES:=$(DIR)/cons-mes.c
189 include make/mescc-mes.make
190
191 TARGET:=cons-mes.mes
192 include make/check.make
193 endif # !SCAFFOLD
194
195 TARGET:=t.mes
196 C_FILES:=$(DIR)/t.c
197 include make/mescc-mes.make
198
199 TARGET:=t.mes
200 include make/check.make
201 endif
202
203 ifneq ($(BOOTSTRAP),)
204 $(OUT)/mini-mes.mes: module/mes/read-0-32.mo
205 TARGET:=mini-mes.mes
206 C_FILES:=$(DIR)/mini-mes.c
207 include make/mescc-mes.make
208 endif