Add crossgcc target to automatically build reference toolchain

This means that a simple:

$ make crossgcc

creates the reference toolchain in the correct directory. Thanks to the
dependency on the clean-for-update target, an existing .xcompile along
with any compiled objects in build/ will be cleaned out, so the next
build will automatically use the newly created reference toolchain.

Signed-off-by: Cristian Magherusan-Stanciu <cristi.magherusan@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6598 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/Makefile b/Makefile
index ac7115d..69e32a4 100644
--- a/Makefile
+++ b/Makefile
@@ -242,6 +242,12 @@
 cscope:
 	cscope -bR
 
+crossgcc: clean-for-update
+	$(MAKE) -C util/crossgcc build
+
+crossgcc-clean: clean-for-update
+	$(MAKE) -C util/crossgcc clean
+
 doxy: doxygen
 doxygen:
 	$(DOXYGEN) documentation/Doxyfile.coreboot
diff --git a/util/crossgcc/Makefile b/util/crossgcc/Makefile
new file mode 100644
index 0000000..6aa07d6
--- /dev/null
+++ b/util/crossgcc/Makefile
@@ -0,0 +1,9 @@
+all: build
+
+build:
+	./buildgcc
+
+clean:
+	rm -rf xgcc
+
+.PHONY: all build clean