From 9e82122e8dcb0e060e0f258e2832032f6a7b99e4 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 6 Dec 2008 18:56:19 -0500 Subject: [PATCH] Makefile cleanups. Don't assemble romlayout16.S with debugging on - gcc gets confused when multiple files with debugging are included. Be more consistent in status messages. Use ccode instead of blob/romlayout32 -- it's more accurate. --- Makefile | 20 ++++++++++---------- src/romlayout.S | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 2c30945..4b2fdda 100644 --- a/Makefile +++ b/Makefile @@ -75,36 +75,36 @@ endif $(OUT)%.proc.16.s: $(OUT)%.16.s - @echo " Moving data sections to text in $<" + @echo " Moving data sections to text in $@" $(Q)sed 's/\t\.section\t\.rodata.*// ; s/\t\.data//' < $< > $@ $(OUT)%.16.s: %.c - @echo " Generating assembler for $<" + @echo " Compiling to assembler $@" $(Q)$(CC) $(CFLAGS16INC) $(DEPHACK) -S -c $< -o $@ $(OUT)%.lds: %.lds.S - @echo " Precompiling $<" + @echo " Precompiling $@" $(Q)$(CPP) -P -D__ASSEMBLY__ $< -o $@ $(OUT)asm-offsets.h: $(OUT)asm-offsets.16.s @echo " Generating offset file $@" $(Q)./tools/gen-offsets.sh $< $@ -$(OUT)blob.16.s: ; $(call whole-compile, $(CFLAGS16) -S, $(addprefix src/, $(SRC16)),$@) +$(OUT)ccode.16.s: ; $(call whole-compile, $(CFLAGS16) -S, $(addprefix src/, $(SRC16)),$@) TABLEASM=$(addprefix $(OUT), $(patsubst %.c,%.proc.16.s,$(TABLESRC))) -$(OUT)romlayout16.o: romlayout.S $(OUT)blob.16.s $(OUT)asm-offsets.h $(TABLEASM) - @echo " Generating 16bit layout of $@" - $(Q)$(CC) $(CFLAGS16) -c -D__ASSEMBLY__ $< -o $@ +$(OUT)romlayout16.o: romlayout.S $(OUT)ccode.16.s $(OUT)asm-offsets.h $(TABLEASM) + @echo " Compiling (16bit) $@" + $(Q)$(CC) $(CFLAGS16INC) -c -D__ASSEMBLY__ $< -o $@ -$(OUT)romlayout32.o: ; $(call whole-compile, $(CFLAGS), $(addprefix src/, $(SRC32)),$@) +$(OUT)ccode32.o: ; $(call whole-compile, $(CFLAGS), $(addprefix src/, $(SRC32)),$@) -$(OUT)rom32.o: $(OUT)romlayout32.o $(OUT)rombios32.lds +$(OUT)rom32.o: $(OUT)ccode32.o $(OUT)rombios32.lds @echo " Linking (no relocs) $@" $(Q)$(LD) -r -d -T $(OUT)rombios32.lds $< -o $@ $(OUT)rom16.o: $(OUT)romlayout16.o $(OUT)rom32.o $(OUT)rombios16.lds - @echo " Linking $@" + @echo " Linking (16bit) $@" $(Q)$(OBJCOPY) --prefix-symbols=_code32_ $(OUT)rom32.o $(OUT)rom32.rename.o $(Q)$(LD) -T $(OUT)rombios16.lds -R $(OUT)rom32.rename.o $< -o $@ diff --git a/src/romlayout.S b/src/romlayout.S index a9788f4..d731072 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -16,7 +16,7 @@ ****************************************************************/ .code16gcc -.include "out/blob.16.s" +.include "out/ccode.16.s" /**************************************************************** -- 2.25.1