diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-04-24 21:23:54 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-04-24 21:23:54 -0700 |
commit | 14cfc50a602a38e8d428f73526d8e6bcbdf59793 (patch) | |
tree | 26c08fda4ca3670957a6b584bbf689cad6ce1956 /riscv/riscv.mk.in | |
parent | adb3e3df44f6a3288d957ec2a256eb2b2c02821f (diff) | |
download | spike-14cfc50a602a38e8d428f73526d8e6bcbdf59793.zip spike-14cfc50a602a38e8d428f73526d8e6bcbdf59793.tar.gz spike-14cfc50a602a38e8d428f73526d8e6bcbdf59793.tar.bz2 |
fix(?) circular dependence on generated headers
Diffstat (limited to 'riscv/riscv.mk.in')
-rw-r--r-- | riscv/riscv.mk.in | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index 42679d0..7863e99 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -2,6 +2,9 @@ riscv_subproject_deps = \ softfloat_riscv \ softfloat \ +riscv_install_prog_srcs = \ + riscv-isa-run.cc \ + riscv_hdrs := \ htif.h \ common.h \ @@ -14,26 +17,6 @@ riscv_hdrs := \ insn_header.h \ cachesim.h \ memtracer.h \ - dispatch.h \ - -NDISPATCH := 9 -DISPATCH_SRCS := \ - dispatch0.cc \ - dispatch1.cc \ - dispatch2.cc \ - dispatch3.cc \ - dispatch4.cc \ - dispatch5.cc \ - dispatch6.cc \ - dispatch7.cc \ - dispatch8.cc \ - dispatch9.cc \ - -$(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) opcodes.h - $< $(subst dispatch,,$(subst .cc,,$@)) $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@ - -$(src_dir)/riscv/dispatch.h: %.h: dispatch opcodes.h - $< $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@ riscv_srcs = \ htif.cc \ @@ -48,5 +31,19 @@ riscv_srcs = \ riscv_test_srcs = -riscv_install_prog_srcs = \ - riscv-isa-run.cc \ +riscv_gen_hdrs: \ + dispatch.h \ + +NDISPATCH := 9 +DISPATCH_SRCS = $(addsuffix .cc,$(addprefix dispatch,$(call range,0,$(NDISPATCH)+1))) + +$(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) opcodes.h + $< $(subst dispatch,,$(subst .cc,,$@)) $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@ + +dispatch.h: %.h: dispatch opcodes.h + echo $(riscv_srcs) + $< $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@ + +riscv_junk = \ + dispatch.h \ + $(DISPATCH_SRCS) \ |