summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-08-05 15:46:56 -0600
committerMartin Roth <martinroth@google.com>2016-08-08 19:15:13 +0200
commit25f8a4f6d44c398b059b79572a11471b06af272f (patch)
tree68e7e48f4ec93574e2fd6fcee166c40f8618468a /Makefile.inc
parent3205170a2e4f9d1c99f36a469ce1d228ed3b50cf (diff)
sconfig: Update command line parameters
Instead of having directories and file names hardcoded, pass in the full path and filename of both the input and output files. In the makefile, create variables for these values, and use them in places that previously had the names and paths written out. Change-Id: Icb6f536547ce3193980ec5d60c786a29755c2813 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16078 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc17
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 46154c6f34..4d7fd694f0 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -451,15 +451,18 @@ $(obj)/config.h: $(objutil)/kconfig/conf
#######################################################################
# needed objects that every mainboard uses
# Creation of these is architecture and mainboard independent
-$(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/$(call strip_quotes, $(CONFIG_DEVICETREE)) $(objutil)/sconfig/sconfig
+DEVICETREE_FILE := $(src)/mainboard/$(MAINBOARDDIR)/$(call strip_quotes, $(CONFIG_DEVICETREE))
+DEVICETREE_STATIC_C := $(obj)/mainboard/$(MAINBOARDDIR)/static.c
+
+$(DEVICETREE_STATIC_C): $(DEVICETREE_FILE) $(objutil)/sconfig/sconfig
@printf " SCONFIG $(subst $(src)/,,$(<))\n"
- mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
- $(objutil)/sconfig/sconfig $(MAINBOARDDIR) $(obj)/mainboard/$(MAINBOARDDIR) $(call strip_quotes, $(CONFIG_DEVICETREE))
+ mkdir -p $(dir $(DEVICETREE_STATIC_C))
+ $(objutil)/sconfig/sconfig $(MAINBOARDDIR) $(DEVICETREE_FILE) $(DEVICETREE_STATIC_C)
-ramstage-y+=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
-romstage-y+=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
-verstage-y+=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
-bootblock-y+=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
+ramstage-y+=$(DEVICETREE_STATIC_C)
+romstage-y+=$(DEVICETREE_STATIC_C)
+verstage-y+=$(DEVICETREE_STATIC_C)
+bootblock-y+=$(DEVICETREE_STATIC_C)
$(objgenerated)/libverstage.a: $$(libverstage-objs)
rm -f $@