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