test_outs += $$($(2)_test_outs)
-install_hdrs += $$(addprefix $(src_dir)/$(1)/, $$($(2)_hdrs))
+vpath %.h $$(src_dir)/$$(1)
+
+install_hdrs += $$($(2)_hdrs)
install_libs += lib$(1).a
install_exes += $$($(2)_install_prog_exes)
install-hdrs : $(install_hdrs)
$(MKINSTALLDIRS) $(install_hdrs_dir)
- for file in $(install_hdrs); \
+ for file in $^; \
do \
$(INSTALL_HDR) $$file $(install_hdrs_dir); \
done
softfloat_riscv \
softfloat \
-riscv_hdrs = \
+repo_hdrs := \
htif.h \
common.h \
decode.h \
trap.h \
opcodes.h \
insn_header.h \
- dispatch.h \
cachesim.h \
memtracer.h \
+riscv_hdrs := \
+ $(repo_hdrs) \
+ dispatch.h
+
+
NDISPATCH := 10
DISPATCH_SRCS := \
dispatch0.cc \
dispatch9.cc \
dispatch10.cc \
-$(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) $(riscv_hdrs)
+$(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) $(riscv_hdrs)
$< $(subst dispatch,,$(subst .cc,,$@)) $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@
-dispatch.h: %.h: dispatch $(riscv_hdrs)
+dispatch.h: %.h: dispatch $(repo_hdrs)
$< $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@
riscv_srcs = \