Browse Source

remove circular dependence in Makefile

Thanks, Sebastien!
confprec
Andrew Waterman 13 years ago
parent
commit
6c19a775f9
  1. 6
      Makefile.in
  2. 12
      riscv/riscv.mk.in

6
Makefile.in

@ -294,7 +294,9 @@ deps += $$($(2)_deps)
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)
@ -329,7 +331,7 @@ check : $(test_outs)
install-hdrs : $(install_hdrs)
$(MKINSTALLDIRS) $(install_hdrs_dir)
for file in $(install_hdrs); \
for file in $^; \
do \
$(INSTALL_HDR) $$file $(install_hdrs_dir); \
done

12
riscv/riscv.mk.in

@ -2,7 +2,7 @@ riscv_subproject_deps = \
softfloat_riscv \
softfloat \
riscv_hdrs = \
repo_hdrs := \
htif.h \
common.h \
decode.h \
@ -12,10 +12,14 @@ riscv_hdrs = \
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 \
@ -30,10 +34,10 @@ DISPATCH_SRCS := \
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 = \

Loading…
Cancel
Save