Browse Source

rv32: fix dependencies

$(genhdrs) is not just a sequence dependency; it is an actual
dependency.

ioregsa.S is a generated header file.

Remove *.lst files.
H. Peter Anvin 1 year ago
parent
commit
3852e7b473
1 changed files with 9 additions and 9 deletions
  1. 9 9
      rv32/Makefile

+ 9 - 9
rv32/Makefile

@@ -37,7 +37,7 @@ VPATH    := .:../common
 .SECONDARY:
 
 genhdrs = iodevs.h irqtable.h roms.h
-gensrcs =
+gensrcs = ioregsa.S
 
 all: sram.bin dram.bin dram.hex checksum.h
 
@@ -128,22 +128,22 @@ jtagupd.elf: sbrk.o
 	$(CC) $(LDFLAGS) -Wl,-T,$< -o $@ \
 		-Wl,--start-group $(filter-out $<,$^) -Wl,--end-group
 
-%.o: %.c | $(genhdrs)
+%.o: %.c $(genhdrs)
 	$(CC) $(CFLAGS) $(CFLAGS_$<) $(gendeps) -c -o $@ $<
 
-%.s: %.c | $(genhdrs)
+%.s: %.c $(genhdrs)
 	$(CC) $(CFLAGS) $(CFLAGS_$<) $(gendeps) -S -o $@ $<
 
-%.i: %.c | $(genhdrs)
+%.i: %.c $(genhdrs)
 	$(CC) $(CFLAGS) $(CFLAGS_$<) $(gendeps) -E -o $@ $<
 
-%.o: %.S | $(genhdrs)
+%.o: %.S $(genhdrs)
 	$(CC) $(SFLAGS) $(SFLAGS_$<) -Wa,-ahlsm=$*.lst $(gendeps) -c -o $@ $<
 
-%.s: %.S | $(genhdrs)
+%.s: %.S $(genhdrs)
 	$(CC) $(SFLAGS) $(SFLAGS_$<) -Wa,-ahlsm=$*.lst $(gendeps) -E -o $@ $<
 
-ioregsa.S: ioregs.h ioregsa.pl | $(genhdrs)
+ioregsa.S: ioregs.h ioregsa.pl $(genhdrs)
 	$(PERL) ioregsa.pl $< $@
 
 .PHONY: roms
@@ -171,7 +171,7 @@ roms.h: roms
 
 abcmem.o: roms.h
 
-%.ild: %.ld | $(genhdrs)
+%.ild: %.ld $(genhdrs)
 	$(CC) $(CFLAGS) $(CFLAGS_$<) $(gendeps) \
 		-x assembler-with-cpp \
 		-fdollars-in-identifiers \
@@ -186,7 +186,7 @@ irqtable.h: ../common/iodevs.conf ../tools/iodevs.pl
 clean:
 	for d in . $(shell find $(SUBDIRS) -type d); do \
 		rm -f $$d/*.a $$d/*.o $$d/*.i $$d/*.s $$d/*.elf $$d/*.bin \
-		$$d/.*.d $$d/*.ild $$d/*.map; \
+		$$d/.*.d $$d/*.ild $$d/*.map $$d/*.lst; \
 	done
 	rm -f $(genhdrs) $(gensrcs) $(ROMOBJ)