Added a test for checking addressing modes.
[jitcs.git] / makefile
blob92bf5bb635235f2e9cd3044af5d597204e2aa4b4
1 CC = g++.bat
2 CFLAGS = -I ./include
3 CFLAGS_DBG32 = -D_DEBUG
4 CFLAGS_REL32 = -D_NDEBUG -O3
5 CFLAGS_DBG64 = -D_DEBUG -m64
6 CFLAGS_REL64 = -D_NDEBUG -O3 -m64
7 LUA = luax51.bat
8 NASM = nasm.bat
9 RM = del
10 SEP = $(subst A,\,A)
11 SRC_SRC = cpu.cpp dumper.cpp tmpalloc.cpp memmgr.cpp bblock.cpp function.cpp callingconvention.cpp \
12 bblock_impl.cpp function_impl.cpp callingconvention_impl.cpp spillslotinfo.cpp \
13 host.cpp machine.cpp virtualregister.cpp \
14 cfg_analysis.cpp codegenerator.cpp
15 SRC_X86 = x86_32_callingconvention.cpp x86_64_callingconvention.cpp \
16 x86_32_machine.cpp x86_64_machine.cpp x86_32_regs.cpp x86_64_regs.cpp \
17 x86_32_insinfo.cpp x86_64_insinfo.cpp x86_32_dumper.cpp x86_64_dumper.cpp \
18 x86_32_codegen.cpp x86_64_codegen.cpp
19 SRC_UNITTEST = test_unittest.cpp test_main.cpp test_fnctypeinfo.cpp \
20 test_adt_range.cpp test_adt_slice.cpp test_callingconvention.cpp \
21 test_simplefunction.cpp test_adt_bitmap.cpp test_adt_tmpvector.cpp \
22 test_bitfuncs.cpp test_power2funcs.cpp test_cfg_analysis.cpp \
23 test_simplecodegen.cpp test_asm.cpp \
24 test_asm_x86_32_ins.cpp test_asm_x86_32_reg.cpp test_asm_x86_32_ext.cpp \
25 test_asm_x86_64_ins.cpp test_asm_x86_64_reg.cpp test_asm_x86_64_ext.cpp \
26 test_allinstructions.cpp
27 X86_INS = x86_arith.ins x86_mov_set.ins x86_other.ins x86_other_vex.ins \
28 x86_simd_arith.ins x86_simd_blend.ins x86_simd_cvt.ins \
29 x86_simd_insext.ins x86_simd_mov.ins x86_simd_shuffle.ins\
30 x86_simd_arith_vex.ins x86_simd_blend_vex.ins x86_simd_cvt_vex.ins \
31 x86_simd_insext_vex.ins x86_simd_mov_vex.ins x86_simd_shuffle_vex.ins \
32 x86_cf.ins x86_addrmode.ins
33 PREFIXES_LIBSRC = dbg32_ rel32_ dbg64_ rel64_
34 PREFIXES_TESTSRC = test32_ test64_ testd32_ testd64_
35 OBJDIR = _objs
36 LIBDIR = _lib
37 BINDIR = _bin
38 BINDATADIR = _bin/data
39 TEST_NAMES = $(patsubst %.cpp,%.o,$(SRC_SRC))
40 LIBOBJ_NAMES = $(addprefix src_,$(patsubst %.cpp,%.o,$(SRC_SRC))) \
41 $(addprefix x86_,$(patsubst %.cpp,%.o,$(SRC_X86)))
42 LIBOBJS_DEBUG32 = $(addprefix $(OBJDIR)/dbg32_,$(LIBOBJ_NAMES))
43 LIBOBJS_RELEASE32 = $(addprefix $(OBJDIR)/rel32_,$(LIBOBJ_NAMES))
44 LIBOBJS_DEBUG64 = $(addprefix $(OBJDIR)/dbg64_,$(LIBOBJ_NAMES))
45 LIBOBJS_RELEASE64 = $(addprefix $(OBJDIR)/rel64_,$(LIBOBJ_NAMES))
46 UNITTESTOBJS_DEBUG32 = $(addprefix $(OBJDIR)/testd32_,$(patsubst test_%.cpp,%.o,$(SRC_UNITTEST)))
47 UNITTESTOBJS_DEBUG64 = $(addprefix $(OBJDIR)/testd64_,$(patsubst test_%.cpp,%.o,$(SRC_UNITTEST)))
48 UNITTESTOBJS_RELEASE32 = $(addprefix $(OBJDIR)/test32_,$(patsubst test_%.cpp,%.o,$(SRC_UNITTEST)))
49 UNITTESTOBJS_RELEASE64 = $(addprefix $(OBJDIR)/test64_,$(patsubst test_%.cpp,%.o,$(SRC_UNITTEST)))
50 OBJPREFIX_SRC = $(addprefix $(OBJDIR)/,$(addsuffix src_,$(PREFIXES_LIBSRC)))
51 OBJPREFIX_X86 = $(addprefix $(OBJDIR)/,$(addsuffix x86_,$(PREFIXES_LIBSRC)))
52 OBJPREFIX_TEST = $(addprefix $(OBJDIR)/,$(PREFIXES_TESTSRC))
53 AS32_FILES = $(addprefix $(BINDATADIR)/,$(patsubst x86_%.ins,x86_32_%.as,$(X86_INS)))
54 AS64_FILES = $(addprefix $(BINDATADIR)/,$(patsubst x86_%.ins,x86_64_%.as,$(X86_INS)))
56 #all : debug release tests
57 all : lua debug tests
58 clean:
59 $(RM) $(subst /,$(SEP),_objs/*)
60 $(RM) $(subst /,$(SEP),_lib/*)
61 $(RM) $(subst /,$(SEP),_bin/*)
62 info:
63 rem info
64 debug : $(LIBDIR)/jitcs_debug32.a $(LIBDIR)/jitcs_debug64.a
66 release : $(LIBDIR)/jitcs_release32.a $(LIBDIR)/jitcs_release64.a
67 tests : $(BINDIR)/test_cpuinfo32.exe $(BINDIR)/test_cpuinfo64.exe \
68 $(AS32_FILES) $(AS64_FILES) \
69 $(BINDIR)/unittestsd32.exe $(BINDIR)/unittestsd64.exe \
70 $(BINDIR)/unittests32.exe $(BINDIR)/unittests64.exe
72 lua : include/jitcs_x86_32_cons.h include/jitcs_x86_64_cons.h \
73 include/jitcs_x86_32_insids.h include/jitcs_x86_64_insids.h \
74 include/jitcs_x86_32_regs.h include/jitcs_x86_64_regs.h
76 include/jitcs_x86_32_cons.h : include/jitcs_x86_xx_cons.lh \
77 src/data/x86_inslist.dat src/data/x86_insalias.dat \
78 tools/template2header.lua
79 $(LUA) tools/template2header.lua $< 32 $@
80 include/jitcs_x86_64_cons.h : include/jitcs_x86_xx_cons.lh \
81 src/data/x86_inslist.dat src/data/x86_insalias.dat \
82 tools/template2header.lua
83 $(LUA) tools/template2header.lua $< 64 $@
84 include/jitcs_x86_32_insids.h : include/jitcs_x86_xx_insids.lh \
85 src/data/x86_inslist.dat src/data/x86_insalias.dat \
86 tools/template2header.lua
87 $(LUA) tools/template2header.lua $< 32 $@
88 include/jitcs_x86_64_insids.h : include/jitcs_x86_xx_insids.lh \
89 src/data/x86_inslist.dat src/data/x86_insalias.dat \
90 tools/template2header.lua
91 $(LUA) tools/template2header.lua $< 64 $@
92 include/jitcs_x86_32_regs.h : include/jitcs_x86_xx_regs.lh src/data/x86_reglist.dat \
93 tools/template2header.lua
94 $(LUA) tools/template2header.lua $< 32 $@
95 include/jitcs_x86_64_regs.h : include/jitcs_x86_xx_regs.lh src/data/x86_reglist.dat \
96 tools/template2header.lua
97 $(LUA) tools/template2header.lua $< 64 $@
98 include/jitcs_x86_32_machine.h : include/jitcs_x86_xx_machine.lh \
99 tools/template2header.lua
100 $(LUA) tools/template2header.lua $< 32 $@
101 include/jitcs_x86_64_machine.h : include/jitcs_x86_xx_machine.lh \
102 tools/template2header.lua
103 $(LUA) tools/template2header.lua $< 64 $@
104 src/x86/jitcs_int_x86_32_machine.h : src/x86/jitcs_int_x86_xx_machine.lh \
105 tools/template2header.lua
106 $(LUA) tools/template2header.lua $< 32 $@
107 src/x86/jitcs_int_x86_64_machine.h : src/x86/jitcs_int_x86_xx_machine.lh \
108 tools/template2header.lua
109 $(LUA) tools/template2header.lua $< 64 $@
110 src/x86/jitcs_int_x86_32_regs.h : src/x86/jitcs_int_x86_xx_regs.lh src/data/x86_reglist.dat \
111 tools/template2header.lua
112 $(LUA) tools/template2header.lua $< 32 $@
113 src/x86/jitcs_int_x86_64_regs.h : src/x86/jitcs_int_x86_xx_regs.lh src/data/x86_reglist.dat \
114 tools/template2header.lua
115 $(LUA) tools/template2header.lua $< 64 $@
116 src/x86/jitcs_int_x86_32_dumper.h : src/x86/jitcs_int_x86_xx_dumper.lh \
117 tools/template2header.lua
118 $(LUA) tools/template2header.lua $< 32 $@
119 src/x86/jitcs_int_x86_64_dumper.h : src/x86/jitcs_int_x86_xx_dumper.lh \
120 tools/template2header.lua
121 $(LUA) tools/template2header.lua $< 64 $@
122 src/x86/src/x86_32_callingconvention.cpp : src/x86/src/x86_xx_callingconvention.lcpp \
123 src/data/x86_reglist.dat \
124 tools/template2header.lua
125 $(LUA) tools/template2header.lua $< 32 $@
126 src/x86/src/x86_64_callingconvention.cpp : src/x86/src/x86_xx_callingconvention.lcpp \
127 src/data/x86_reglist.dat \
128 tools/template2header.lua
129 $(LUA) tools/template2header.lua $< 64 $@
130 src/x86/src/x86_32_machine.cpp : src/x86/src/x86_xx_machine.lcpp src/data/x86_reglist.dat \
131 tools/template2header.lua
132 $(LUA) tools/template2header.lua $< 32 $@
133 src/x86/src/x86_64_machine.cpp : src/x86/src/x86_xx_machine.lcpp src/data/x86_reglist.dat \
134 tools/template2header.lua
135 $(LUA) tools/template2header.lua $< 64 $@
136 src/x86/src/x86_32_regs.cpp : src/x86/src/x86_xx_regs.lcpp src/data/x86_reglist.dat \
137 tools/template2header.lua
138 $(LUA) tools/template2header.lua $< 32 $@
139 src/x86/src/x86_64_regs.cpp : src/x86/src/x86_xx_regs.lcpp src/data/x86_reglist.dat \
140 tools/template2header.lua
141 $(LUA) tools/template2header.lua $< 64 $@
142 src/x86/src/x86_32_insinfo.cpp : src/x86/src/x86_xx_insinfo.lcpp src/data/x86_reglist.dat \
143 tools/template2header.lua src/data/x86_inslist.dat
144 $(LUA) tools/template2header.lua $< 32 $@
145 src/x86/src/x86_64_insinfo.cpp : src/x86/src/x86_xx_insinfo.lcpp src/data/x86_reglist.dat \
146 tools/template2header.lua src/data/x86_inslist.dat
147 $(LUA) tools/template2header.lua $< 64 $@
148 src/x86/src/x86_32_dumper.cpp : src/x86/src/x86_xx_dumper.lcpp src/data/x86_reglist.dat \
149 tools/template2header.lua src/data/x86_inslist.dat
150 $(LUA) tools/template2header.lua $< 32 $@
151 src/x86/src/x86_64_dumper.cpp : src/x86/src/x86_xx_dumper.lcpp src/data/x86_reglist.dat \
152 tools/template2header.lua src/data/x86_inslist.dat
153 $(LUA) tools/template2header.lua $< 64 $@
154 src/x86/src/x86_32_codegen.cpp : src/x86/src/x86_xx_codegen.lcpp src/data/x86_inslist.dat \
155 tools/template2header.lua
156 $(LUA) tools/template2header.lua $< 32 $@
157 src/x86/src/x86_64_codegen.cpp : src/x86/src/x86_xx_codegen.lcpp src/data/x86_inslist.dat \
158 tools/template2header.lua
159 $(LUA) tools/template2header.lua $< 64 $@
161 tests/test_asm_x86_32.h : tests/test_asm_x86_xx.lh \
162 tools/template2header.lua
163 $(LUA) tools/template2header.lua $< 32 $@
164 tests/test_asm_x86_64.h : tests/test_asm_x86_xx.lh \
165 tools/template2header.lua
166 $(LUA) tools/template2header.lua $< 64 $@
167 tests/test_asm_x86_32_reg.cpp : tests/test_asm_x86_xx_reg.lcpp \
168 src/data/x86_reglist.dat \
169 tools/template2header.lua
170 $(LUA) tools/template2header.lua $< 32 $@
171 tests/test_asm_x86_64_reg.cpp : tests/test_asm_x86_xx_reg.lcpp \
172 src/data/x86_reglist.dat \
173 tools/template2header.lua
174 $(LUA) tools/template2header.lua $< 64 $@
175 tests/test_asm_x86_32_ins.cpp : tests/test_asm_x86_xx_ins.lcpp \
176 src/data/x86_inslist.dat src/data/x86_reglist.dat \
177 src/data/x86_insalias.dat \
178 tools/template2header.lua
179 $(LUA) tools/template2header.lua $< 32 $@
180 tests/test_asm_x86_64_ins.cpp : tests/test_asm_x86_xx_ins.lcpp \
181 src/data/x86_inslist.dat src/data/x86_reglist.dat \
182 src/data/x86_insalias.dat \
183 tools/template2header.lua
184 $(LUA) tools/template2header.lua $< 64 $@
185 tests/test_asm_x86_32_ext.cpp : tests/test_asm_x86_xx_ext.lcpp \
186 tools/template2header.lua
187 $(LUA) tools/template2header.lua $< 32 $@
188 tests/test_asm_x86_64_ext.cpp : tests/test_asm_x86_xx_ext.lcpp \
189 tools/template2header.lua
190 $(LUA) tools/template2header.lua $< 64 $@
193 src/data/x86_inslist.dat : src/data/x86_inslist.ltxt tools/x86_inslist2data.lua
194 $(LUA) tools/x86_inslist2data.lua $< $@
195 src/data/x86_insalias.dat : src/data/x86_insalias.ltxt tools/x86_insalias2data.lua
196 $(LUA) tools/x86_insalias2data.lua $< $@
198 $(LIBDIR)/jitcs_debug32.a : $(LIBOBJS_DEBUG32) | $(LIBDIR)
199 ar r $@ $?
200 $(LIBDIR)/jitcs_release32.a : $(LIBOBJS_RELEASE32) | $(LIBDIR)
201 ar r $@ $?
202 $(LIBDIR)/jitcs_debug64.a : | $(LIBDIR)
203 rem --
204 $(LIBDIR)/jitcs_release64.a : | $(LIBDIR)
205 rem --
207 $(BINDIR)/test_cpuinfo32.exe : tests/cpuinfo.cpp $(LIBDIR)/jitcs_release32.a \
208 include/jitcs_cpu.h \
209 | $(BINDIR)
210 $(CC) -o $@ $(CFLAGS) $(CFLAGS_REL32) $< $(LIBDIR)/jitcs_release32.a
211 $(BINDIR)/test_cpuinfo64.exe : | $(BINDIR)
212 rem --
213 $(BINDIR)/unittests32.exe : $(UNITTESTOBJS_RELEASE32) $(LIBDIR)/jitcs_release32.a \
214 | $(BINDIR) $(BINDATADIR)
215 $(CC) -o $@ $(CFLAGS) $(CFLAGS_REL32) $(UNITTESTOBJS_RELEASE32) $(LIBDIR)/jitcs_release32.a
216 $(BINDIR)/unittestsd32.exe : $(UNITTESTOBJS_DEBUG32) $(LIBDIR)/jitcs_debug32.a \
217 | $(BINDIR) $(BINDATADIR)
218 $(CC) -o $@ $(CFLAGS) $(CFLAGS_DBG32) $(UNITTESTOBJS_DEBUG32) $(LIBDIR)/jitcs_debug32.a
219 $(BINDIR)/unittests64.exe : | $(BINDIR) $(BINDATADIR)
220 rem --
221 $(BINDIR)/unittestsd64.exe : | $(BINDIR) $(BINDATADIR)
222 rem --
224 $(addsuffix cpu.o, $(OBJPREFIX_SRC)): \
225 include/jitcs_base.h include/jitcs_cpu.h \
226 include/jitcs_adt_bitstore.h
227 $(OBJDIR)/dbg32_src_bblock.o $(OBJDIR)/rel32_src_bblock.o \
228 $(OBJDIR)/dbg64_src_bblock.o $(OBJDIR)/rel64_src_bblock.o: \
229 include/jitcs_base.h include/jitcs_bblock.h \
230 src/jitcs_int_bblock_impl.h
231 $(OBJDIR)/dbg32_src_bblock_impl.o $(OBJDIR)/rel32_src_bblock_impl.o \
232 $(OBJDIR)/dbg64_src_bblock_impl.o $(OBJDIR)/rel64_src_bblock_impl.o: \
233 include/jitcs_base.h include/jitcs_dumper.h \
234 src/jitcs_int_bblock_impl.h src/jitcs_int_function_impl.h
235 $(OBJDIR)/dbg32_src_function.o $(OBJDIR)/rel32_src_function.o \
236 $(OBJDIR)/dbg64_src_function.o $(OBJDIR)/rel64_src_function.o: \
237 include/jitcs_base.h include/jitcs_function.h \
238 src/jitcs_int_function_impl.h
239 $(OBJDIR)/dbg32_src_function_impl.o $(OBJDIR)/rel32_src_function_impl.o \
240 $(OBJDIR)/dbg64_src_function_impl.o $(OBJDIR)/rel64_src_function_impl.o: \
241 include/jitcs_base.h include/jitcs_dumper.h \
242 src/jitcs_int_function_impl.h src/jitcs_int_bblock_impl.h
243 $(OBJDIR)/dbg32_src_callingconvention.o $(OBJDIR)/rel32_src_callingconvention.o \
244 $(OBJDIR)/dbg64_src_callingconvention.o $(OBJDIR)/rel64_src_callingconvention.o: \
245 include/jitcs_base.h include/jitcs_callingconvention.h \
246 include/jitcs_dumper.h
247 $(OBJDIR)/dbg32_src_callingconvention_impl.o $(OBJDIR)/rel32_src_callingconvention_impl.o \
248 $(OBJDIR)/dbg64_src_callingconvention_impl.o $(OBJDIR)/rel64_src_callingconvention_impl.o: \
249 include/jitcs_base.h \
250 src/jitcs_int_callingconvention_impl.h
251 $(OBJDIR)/dbg32_src_memmgr.o $(OBJDIR)/rel32_src_memmgr.o \
252 $(OBJDIR)/dbg64_src_memmgr.o $(OBJDIR)/rel64_src_memmgr.o: \
253 include/jitcs_base.h \
254 include/jitcs_memmgr.h include/jitcs_cpu.h
255 $(OBJDIR)/dbg32_src_spillslotinfo.o $(OBJDIR)/rel32_src_spillslotinfo.o \
256 $(OBJDIR)/dbg64_src_spillslotinfo.o $(OBJDIR)/rel64_src_spillslotinfo.o: \
257 include/jitcs_base.h \
258 include/jitcs_spillslotinfo.h include/jitcs_dumper.h
259 $(OBJDIR)/dbg32_src_tmpalloc.o $(OBJDIR)/rel32_src_tmpalloc.o \
260 $(OBJDIR)/dbg64_src_tmpalloc.o $(OBJDIR)/rel64_src_tmpalloc.o: \
261 include/jitcs_base.h \
262 include/jitcs_tmpalloc.h
263 $(addsuffix dumper.o, $(OBJPREFIX_SRC)): \
264 include/jitcs_machine.h \
265 src/x86/jitcs_int_x86_32_dumper.h src/x86/jitcs_int_x86_64_dumper.h
266 $(addsuffix virtualregister.o, $(OBJPREFIX_SRC)): \
267 include/jitcs_machine.h src/jitcs_int_virtualregister.h
268 $(addsuffix cfg_analysis.o, $(OBJPREFIX_SRC)): \
269 src/jitcs_int_cfg_analysis.h
270 $(addsuffix x86_32_callingconvention.o, $(OBJPREFIX_X86)): \
271 src/x86/jitcs_int_x86_32_machine.h src/x86/jitcs_int_x86_32_regs.h
272 $(addsuffix x86_64_callingconvention.o, $(OBJPREFIX_X86)): \
273 src/x86/jitcs_int_x86_64_machine.h src/x86/jitcs_int_x86_64_regs.h
274 $(addsuffix x86_32_machine.o, $(OBJPREFIX_X86)): \
275 src/x86/jitcs_int_x86_32_machine.h src/x86/jitcs_int_x86_32_regs.h \
276 include/jitcs_x86_32_machine.h src/jitcs_int_machine.h
277 $(addsuffix x86_64_machine.o, $(OBJPREFIX_X86)): \
278 src/x86/jitcs_int_x86_64_machine.h src/x86/jitcs_int_x86_64_regs.h \
279 include/jitcs_x86_64_machine.h src/jitcs_int_machine.h
280 $(addsuffix x86_32_regs.o, $(OBJPREFIX_X86)): \
281 src/x86/jitcs_int_x86_32_regs.h
282 $(addsuffix x86_64_regs.o, $(OBJPREFIX_X86)): \
283 src/x86/jitcs_int_x86_64_regs.h
284 $(addsuffix x86_32_insinfo.o, $(OBJPREFIX_X86)): \
285 include/jitcs_x86_32_insids.h
286 $(addsuffix x86_64_insinfo.o, $(OBJPREFIX_X86)): \
287 include/jitcs_x86_64_insids.h
288 $(addsuffix x86_32_dumper.o, $(OBJPREFIX_X86)): \
289 src/x86/jitcs_int_x86_32_dumper.h
290 $(addsuffix x86_64_dumper.o, $(OBJPREFIX_X86)): \
291 src/x86/jitcs_int_x86_64_dumper.h
294 $(addsuffix main.o, $(OBJPREFIX_TEST)): \
295 include/jitcs_base.h tests/unittest.h
296 $(addsuffix unittest.o, $(OBJPREFIX_TEST)): \
297 include/jitcs_base.h tests/unittest.h
298 $(addsuffix fnctypeinfo.o, $(OBJPREFIX_TEST)): \
299 include/jitcs_base.h include/jitcs_fnctypeinfo.h
300 $(addsuffix adt_range.o, $(OBJPREFIX_TEST)): \
301 include/jitcs_base.h include/jitcs_adt_range.h
302 $(addsuffix adt_slice.o, $(OBJPREFIX_TEST)): \
303 include/jitcs_base.h include/jitcs_adt_slice.h
304 $(addsuffix callingconvention.o, $(OBJPREFIX_TEST)): \
305 include/jitcs_base.h include/jitcs_callingconvention.h \
306 src/x86/jitcs_int_x86_32_machine.h src/x86/jitcs_int_x86_64_machine.h
307 $(addsuffix simplefunction.o, $(OBJPREFIX_TEST)): \
308 include/jitcs_base.h include/jitcs_callingconvention.h \
309 include/jitcs_instructionstream.h include/jitcs.h
310 $(addsuffix adt_array.o, $(OBJPREFIX_TEST)): \
311 include/jitcs_base.h src/jitcs_int_adt_array.h
312 $(addsuffix adt_bitmap.o, $(OBJPREFIX_TEST)): \
313 include/jitcs_base.h src/jitcs_int_adt_bitmap.h
314 $(addsuffix adt_tmpvector.o, $(OBJPREFIX_TEST)): \
315 include/jitcs_base.h src/jitcs_int_adt_tmpvector.h
316 $(addsuffix bitfuncs.o, $(OBJPREFIX_TEST)): \
317 include/jitcs_base.h src/jitcs_int_bitfuncs.h
318 $(addsuffix power2funcs.o, $(OBJPREFIX_TEST)): \
319 include/jitcs_base.h src/jitcs_int_power2funcs.h
320 $(addsuffix asm.o, $(OBJPREFIX_TEST)): \
321 tests/test_asm.h
322 $(addsuffix asm_x86_32.o, $(OBJPREFIX_TEST)): \
323 tests/test_asm.h tests/test_asm_x86_32.h
324 $(addsuffix asm_x86_64.o, $(OBJPREFIX_TEST)): \
325 tests/test_asm.h tests/test_asm_x86_64.h
327 $(OBJDIR)/dbg32_src_%.o : src/src/%.cpp
328 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_DBG32) $<
329 $(OBJDIR)/rel32_src_%.o : src/src/%.cpp
330 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_REL32) $<
331 $(OBJDIR)/dbg64_src_%.o : src/src/%.cpp
332 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_DBG64) $<
333 $(OBJDIR)/rel64_src_%.o : src/src/%.cpp
334 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_REL64) $<
335 $(OBJDIR)/dbg32_x86_%.o : src/x86/src/%.cpp
336 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_DBG32) $<
337 $(OBJDIR)/rel32_x86_%.o : src/x86/src/%.cpp
338 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_REL32) $<
339 $(OBJDIR)/dbg64_x86_%.o : src/x86/src/%.cpp
340 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_DBG64) $<
341 $(OBJDIR)/rel64_x86_%.o : src/x86/src/%.cpp
342 $(CC) -o $@ -c -I ./src $(CFLAGS) $(CFLAGS_REL64) $<
343 $(OBJDIR)/test32_%.o : tests/test_%.cpp
344 $(CC) -o $@ -c -I ./tests -I ./src $(CFLAGS) $(CFLAGS_REL32) $<
345 $(OBJDIR)/testd32_%.o : tests/test_%.cpp
346 $(CC) -o $@ -c -I ./tests -I ./src $(CFLAGS) $(CFLAGS_DBG32) $<
347 $(OBJDIR)/test64_%.o : tests/test_%.cpp
348 $(CC) -o $@ -c -I ./tests -I ./src $(CFLAGS) $(CFLAGS_REL64) $<
349 $(OBJDIR)/testd64_%.o : tests/test_%.cpp
350 $(CC) -o $@ -c -I ./tests -I ./src $(CFLAGS) $(CFLAGS_DBG64) $<
352 $(BINDATADIR)/x86_32_%.as : tests/x86/x86_%.ins tools/x86_instool.lua
353 $(LUA) tools/x86_instool.lua ins2nasm32 $< $(OBJDIR)/n32_$*.nasm
354 $(NASM) -o $(OBJDIR)/n32_$*.bin -l $(OBJDIR)/n32_$*.lst $(OBJDIR)/n32_$*.nasm
355 $(LUA) tools/x86_instool.lua nasm2as32 $< $(OBJDIR)/n32_$*.lst $@
356 $(BINDATADIR)/x86_64_%.as : tests/x86/x86_%.ins tools/x86_instool.lua
357 $(LUA) tools/x86_instool.lua ins2nasm64 $< $(OBJDIR)/n64_$*.nasm
358 $(NASM) -o $(OBJDIR)/n64_$*.bin -l $(OBJDIR)/n64_$*.lst $(OBJDIR)/n64_$*.nasm
359 $(LUA) tools/x86_instool.lua nasm2as64 $< $(OBJDIR)/n64_$*.lst $@
361 $(LIBOBJS_DEBUG32) $(LIBOBJS_RELEASE32) \
362 $(LIBOBJS_DEBUG64) $(LIBOBJS_RELEASE64) \
363 $(UNITTESTOBJS_RELEASE32) : | $(OBJDIR)
364 $(BINDATADIR): | $(BINDIR)
365 $(OBJDIR) $(LIBDIR) $(BINDIR) $(BINDATADIR):
366 mkdir $(subst /,$(SEP),$@)