VARIANT ?= versatileab # Uses a binary GCC delivery from Linaro # https://launchpad.net/linaro-toolchain-binaries/+download #CROSS_COMPILE ?= arm-linux-gnueabihf- #CROSS_COMPILE ?= arm-linux-gnueabi- CROSS_COMPILE ?= armv4l- # The old CodeSourcery binaries look like this # CROSS_COMPILE ?= arm-none-eabi- build_dir := $(CURDIR)/build-versatile output_dir := $(HOME) .PHONY: have-crosscompiler have-crosscompiler: @echo -n "Check that $(CROSS_COMPILE)gcc is available..." @which $(CROSS_COMPILE)gcc > /dev/null ; \ if [ ! $$? -eq 0 ] ; then \ echo "ERROR: cross-compiler $(CROSS_COMPILE)gcc not in PATH=$$PATH!" ; \ echo "ABORTING." ; \ exit 1 ; \ else \ echo "OK" ;\ fi build: have-crosscompiler FORCE rm -rf $(build_dir) @mkdir -p $(build_dir) $(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) distclean $(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) $(VARIANT) cp $(build_dir)/u-boot.bin $(output_dir) clean: $(MAKE) O=$(build_dir) clean rm -rf $(build_dir) # Rules without commands or prerequisites that do not match a file name # are considered to always change when make runs. This means that any rule # that depends on FORCE will always be remade also. FORCE: