summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--src/arch/i386/Makefile.bigbootblock.inc2
-rw-r--r--src/arch/i386/Makefile.tinybootblock.inc2
3 files changed, 12 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index f9f17f69e9..e87c2c8a3b 100644
--- a/Makefile
+++ b/Makefile
@@ -126,6 +126,10 @@ evaluate_subdirs=$(eval cursubdirs:=$(subdirs)) $(eval subdirs:=) $(foreach dir,
subdirs:=$(PLATFORM-y) $(BUILD-y)
$(eval $(call evaluate_subdirs, modify))
+initobjs:=$(addsuffix .initobj.o, $(basename $(initobjs)))
+drivers:=$(addsuffix .driver.o, $(basename $(drivers)))
+smmobjs:=$(addsuffix .smmobj.o, $(basename $(smmobjs)))
+
allobjs:=$(foreach var, $(addsuffix s,$(types)), $($(var)))
alldirs:=$(sort $(abspath $(dir $(allobjs))))
source_with_ext=$(patsubst $(obj)/%.o,src/%.$(1),$(allobjs))
@@ -160,37 +164,37 @@ $(obj)/$(1)%.o: src/$(1)%.S $(obj)/config.h
endef
define initobjs_c_template
-$(obj)/$(1)%.o: src/$(1)%.c $(obj)/config.h
+$(obj)/$(1)%.initobj.o: src/$(1)%.c $(obj)/config.h
@printf " CC $$(subst $$(obj)/,,$$(@))\n"
$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef
define initobjs_S_template
-$(obj)/$(1)%.o: src/$(1)%.S $(obj)/config.h
+$(obj)/$(1)%.initobj.o: src/$(1)%.S $(obj)/config.h
@printf " CC $$(subst $$(obj)/,,$$(@))\n"
$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
endef
define drivers_c_template
-$(obj)/$(1)%.o: src/$(1)%.c $(obj)/config.h
+$(obj)/$(1)%.driver.o: src/$(1)%.c $(obj)/config.h
@printf " CC $$(subst $$(obj)/,,$$(@))\n"
$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef
define drivers_S_template
-$(obj)/$(1)%.o: src/$(1)%.S
+$(obj)/$(1)%.driver.o: src/$(1)%.S
@printf " CC $$(subst $$(obj)/,,$$(@))\n"
$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
endef
define smmobjs_c_template
-$(obj)/$(1)%.o: src/$(1)%.c
+$(obj)/$(1)%.smmobj.o: src/$(1)%.c
@printf " CC $$(subst $$(obj)/,,$$(@))\n"
$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef
define smmobjs_S_template
-$(obj)/$(1)%.o: src/$(1)%.S
+$(obj)/$(1)%.smmobj.o: src/$(1)%.S
@printf " CC $$(subst $$(obj)/,,$$(@))\n"
$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef
diff --git a/src/arch/i386/Makefile.bigbootblock.inc b/src/arch/i386/Makefile.bigbootblock.inc
index a8882316b7..fbdc3fb8b9 100644
--- a/src/arch/i386/Makefile.bigbootblock.inc
+++ b/src/arch/i386/Makefile.bigbootblock.inc
@@ -22,7 +22,7 @@ $(obj)/crt0_includes.h: $(crt0s)
@printf " GEN $(subst $(obj)/,,$(@))\n"
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
-$(obj)/mainboard/$(MAINBOARDDIR)/crt0.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
+$(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/crt0_includes.h
diff --git a/src/arch/i386/Makefile.tinybootblock.inc b/src/arch/i386/Makefile.tinybootblock.inc
index 9c048006bb..8911844d9e 100644
--- a/src/arch/i386/Makefile.tinybootblock.inc
+++ b/src/arch/i386/Makefile.tinybootblock.inc
@@ -95,7 +95,7 @@ $(obj)/romstage/crt0_includes.h: $(crt0s)
mkdir -p $(obj)/romstage
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
-$(obj)/mainboard/$(MAINBOARDDIR)/crt0.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
+$(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/romstage/crt0_includes.h