1 get_insn_list
= $(shell sed
's/DECLARE_INSN(\(.*\),.*,.*)/\1/' $(1))
2 get_opcode
= $(shell grep
\\\
<$(2)\\\
> $(1) | sed
's/DECLARE_INSN(.*,\(.*\),.*)/\1/')
4 hwacha_subproject_deps
= \
8 hwacha_install_prog_srcs
= \
15 decode_hwacha_ut_half.h \
18 opcodes_hwacha_ut_half.h \
24 $(hwacha_ut_gen_srcs
) \
25 $(hwacha_ut_half_gen_srcs
) \
30 $(addsuffix .
cc, $(call get_insn_list
,$(src_dir
)/hwacha
/opcodes_hwacha.h
))
32 $(hwacha_gen_srcs
): %.
cc: insns
/%.h insn_template_hwacha.
cc
33 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,,$@))/' > $@
35 hwacha_ut_gen_srcs
= \
36 $(addsuffix .
cc, $(call get_insn_list
,$(src_dir
)/hwacha
/opcodes_hwacha_ut.h
))
38 $(hwacha_ut_gen_srcs
): %.
cc: insns_ut
/%.h insn_template_hwacha_ut.
cc
39 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,,$@))/' > $@
41 hwacha_ut_half_gen_srcs
= \
42 $(addsuffix .
cc, $(call get_insn_list
,$(src_dir
)/hwacha
/opcodes_hwacha_ut_half.h
))
44 $(hwacha_ut_half_gen_srcs
): %.
cc: insns_ut_half
/%.h insn_template_hwacha_ut_half.
cc
45 sed
's/NAME/$(subst .cc,,$@)/' $(src_dir
)/hwacha
/insn_template_hwacha_ut_half.
cc | sed
's/OPCODE/$(call get_opcode,$(src_dir)/hwacha/opcodes_hwacha_ut_half.h,$(subst .cc,,$@))/' > $@