1 # Copyright 2008-2009 Segher Boessenkool <segher@kernel.crashing.org>
2 # This code is licensed to you under the terms of the GNU GPL, version 2;
3 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
8 # What toolchain prefix should we use
11 # Where are the tools (http://git.infradead.org/users/segher/wii.git)
12 TOOLS ?= $(HOME)/wii/segher
14 # End of configuration.
18 # Set CC, LD, OBJCOPY based on CROSS, unless they are set already
20 ifeq ($(origin CC), default)
21 CC := $(CROSS)gcc -m32
23 ifeq ($(origin LD), default)
26 OBJCOPY ?= $(CROSS)objcopy
29 # The compiler flags we need.
31 CFLAGS := -Wall -W -Os -ffreestanding -mno-eabi -mno-sdata -mcpu=750
34 # Build with "V=1" to see the commands executed; be quiet otherwise.
40 MAKEFLAGS += --no-print-directory
47 $(Q)./describe.sh > .$@-tmp
48 $(Q)cmp -s $@ .$@-tmp || cp .$@-tmp $@
53 $(Q)$(MAKE) -C twilight
60 $(MAKE) -C loader clean
61 $(MAKE) -C twilight clean