From db273065f67ef432937399a324364822539ca559 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 27 Mar 2015 17:03:28 +0100 Subject: build system: extend src-to-obj for non-.c/.S files It also creates file names in the build directory and with the stage sliced in, but keeps the extension for anything not .c or .S. Also some handling for non-.c/.S files was adapted to match. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: If8f89a7daffcf51f430b64c3293d2a817ae5120f Signed-off-by: Patrick Georgi Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9175 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/arch/arm64/armv8/secmon/Makefile.inc | 2 +- src/arch/x86/Makefile.inc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch') diff --git a/src/arch/arm64/armv8/secmon/Makefile.inc b/src/arch/arm64/armv8/secmon/Makefile.inc index 6609692e3c..85c3c0a161 100644 --- a/src/arch/arm64/armv8/secmon/Makefile.inc +++ b/src/arch/arm64/armv8/secmon/Makefile.inc @@ -38,7 +38,7 @@ secmon-y += ../exception.c secmon-y += ../../cpu.c secmon-y += ../../transition_asm.S ../../transition.c -ramstage-srcs += $(SECMON_BIN) +ramstage-srcs += $(SECMON_BIN).o $(SECMON_OBJ): $$(secmon-objs) $(CC_secmon) $(LDFLAGS) -nostdlib -r -o $@ $^ diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index e6b4bad64c..8e6ad6d932 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -196,7 +196,7 @@ $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/ mv $@.tmp $@ endif -romstage-srcs += $(objgenerated)/crt0.s +romstage-srcs += $(objgenerated)/crt0.S romstage-libs ?= @@ -237,11 +237,11 @@ $(objgenerated)/crt0.romstage.S: $$(crt0s) @printf " GEN $(subst $(obj)/,,$(@))\n" printf '$(foreach crt0,$(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@ -$(objgenerated)/crt0.romstage.o: $(objgenerated)/crt0.s +$(objgenerated)/crt0.romstage.o: $(objgenerated)/crt0.S @printf " CC $(subst $(obj)/,,$(@))\n" $(CC_romstage) $(CFLAGS_x86_32) $(DISASSEMBLY) -c -o $@ $< > $(basename $@).disasm -$(objgenerated)/crt0.s: $(objgenerated)/crt0.romstage.S $(obj)/config.h $(obj)/build.h +$(objgenerated)/crt0.S: $(objgenerated)/crt0.romstage.S $(obj)/config.h $(obj)/build.h @printf " CC $(subst $(obj)/,,$(@))\n" $(CC_romstage) $(CPPFLAGS_romstage) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -include $(obj)/config.h -include $(obj)/build.h -I. -I$(src) $< -o $@ -- cgit v1.2.3