From a2acbc70a3eb6544a9909e71939633cf160b082e Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 16 Apr 2010 22:48:57 +0000 Subject: Build utils into their source directory equivalent in the build tree. Allow separate build tree for utils Use separate build tree for utils in abuild Signed-off-by: Patrick Georgi Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5453 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f3a4fbf549..bbad332945 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,8 @@ export top := $(PWD) export src := src export srck := $(top)/util/kconfig export obj ?= build -export objk := $(obj)/util/kconfig +export objutil ?= $(obj)/util +export objk := $(objutil)/kconfig export KERNELVERSION := 4.0 @@ -58,7 +59,7 @@ endif endif CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E -ROMCC:= $(obj)/romcc +ROMCC:= $(objutil)/romcc/romcc HOSTCC = gcc HOSTCXX = g++ HOSTCFLAGS := -I$(srck) -I$(objk) -g @@ -145,14 +146,14 @@ $(obj)/config.h: ####################################################################### # Build the tools -CBFSTOOL:=$(obj)/util/cbfstool/cbfstool +CBFSTOOL:=$(objutil)/cbfstool/cbfstool # needed objects that every mainboard uses # Creation of these is architecture and mainboard independent -$(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/devicetree.cb $(obj)/util/sconfig/sconfig +$(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/devicetree.cb $(objutil)/sconfig/sconfig @printf " SCONFIG $(subst $(src)/,,$(<))\n" mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) - $(obj)/util/sconfig/sconfig $(MAINBOARDDIR) $(obj)/mainboard/$(MAINBOARDDIR) + $(objutil)/sconfig/sconfig $(MAINBOARDDIR) $(obj)/mainboard/$(MAINBOARDDIR) objs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.o initobjs:= @@ -286,7 +287,7 @@ endif prepare: mkdir -p $(obj) - mkdir -p $(obj)/util/kconfig/lxdialog $(obj)/util/cbfstool + mkdir -p $(objutil)/kconfig/lxdialog $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options test -n "$(alldirs)" && mkdir -p $(alldirs) || true $(obj)/build.h: .xcompile @@ -355,7 +356,7 @@ endif ifeq ($(_OS),CYGWIN_) STACK=-Wl,--stack,16384000 endif -$(obj)/romcc: $(top)/util/romcc/romcc.c +$(objutil)/romcc/romcc: $(top)/util/romcc/romcc.c @printf " HOSTCC $(subst $(obj)/,,$(@)) (this may take a while)\n" @# Note: Adding -O2 here might cause problems. For details see: @# http://www.coreboot.org/pipermail/coreboot/2010-February/055825.html -- cgit v1.2.3