aboutsummaryrefslogtreecommitdiff
path: root/hwacha/hwacha.mk.in
blob: b4f375ebbcc7c412aaf017671f300ba64f87890f (plain)
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
hwacha_subproject_deps = \
	riscv \
	softfloat \

hwacha_install_prog_srcs = \

hwacha_hdrs = \
	hwacha.h \
	hwacha_xcpt.h \
	decode_hwacha.h \
	decode_hwacha_ut.h \
	opcodes_hwacha.h \
	opcodes_hwacha_ut.h \
	insn_template_hwacha.h \
	insn_template_hwacha_ut.h \

hwacha_precompiled_hdrs = \
	insn_template_hwacha.h \
	insn_template_hwacha_ut.h \

hwacha_srcs = \
	hwacha.cc \
	hwacha_disasm.cc \
	cvt16.cc \
	$(hwacha_gen_srcs) \
	$(hwacha_ut_gen_srcs) \

hwacha_test_srcs =

hwacha_gen_srcs = \
	$(addsuffix .cc, $(call get_insn_list,$(src_dir)/hwacha/opcodes_hwacha.h))

$(hwacha_gen_srcs): %.cc: insns/%.h insn_template_hwacha.cc
	sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/hwacha/insn_template_hwacha.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/hwacha/opcodes_hwacha.h,$(subst .cc,,$@))/' > $@

hwacha_ut_gen_srcs = \
	$(addsuffix .cc, $(call get_insn_list,$(src_dir)/hwacha/opcodes_hwacha_ut.h))

$(hwacha_ut_gen_srcs): %.cc: insns_ut/%.h insn_template_hwacha_ut.cc
	sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/hwacha/insn_template_hwacha_ut.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/hwacha/opcodes_hwacha_ut.h,$(subst .cc,,$@))/' > $@