Merge pull request #117 from riscv/multicore_debug
[riscv-isa-sim.git] / debug_rom / Makefile
index 825aed8cca88aecfeca3ec160f90208727d2638f..0a67ba102623b9861ea713ef973a447a4a3cebce 100644 (file)
@@ -7,12 +7,9 @@ OBJCOPY = $(RISCV)/bin/riscv64-unknown-elf-objcopy
 COMPILE = $(CC) -nostdlib -nostartfiles -I.. -Tlink.ld
 
 ELFS = debug_rom
-DEPS = debug_rom.S link.ld
+DEPS = debug_rom.S link.ld debug_rom_defines.h
 
-all: $(patsubst %,%.h,$(ELFS)) $(patsubst %,%_defines.h,$(ELFS))
-
-%_defines.h: %.S
-       grep define $^ > $@
+all: $(patsubst %,%.h,$(ELFS))
 
 %.h:   %.raw
        xxd -i $^ | sed "s/^unsigned/static const unsigned/" > $@
@@ -24,4 +21,4 @@ debug_rom:    $(DEPS)
        $(COMPILE) -o $@ $^
 
 clean:
-       rm -f $(ELFS) debug_rom*.raw debug_rom*.h
+       rm -f $(ELFS) debug_rom*.raw debug_rom.h