-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
66 lines (45 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 2008-2009 Segher Boessenkool <[email protected]>
# This code is licensed to you under the terms of the GNU GPL, version 2;
# see file COPYING or https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# Configuration:
# What toolchain prefix should we use
CROSS ?= broadway-
# Where are the tools (https://git.infradead.org/users/segher/wii.git)
TOOLS ?= $(HOME)/wii/segher
# End of configuration.
# Set CC, LD, OBJCOPY based on CROSS, unless they are set already
ifeq ($(origin CC), default)
CC := $(CROSS)gcc -m32
endif
ifeq ($(origin LD), default)
LD := $(CROSS)ld
endif
OBJCOPY ?= $(CROSS)objcopy
# The compiler flags we need.
CFLAGS := -Wall -W -Os -ffreestanding -mno-eabi -mno-sdata -mcpu=750
# Build with "V=1" to see the commands executed; be quiet otherwise.
ifeq ($(V),1)
Q :=
else
Q := @
MAKEFLAGS += --no-print-directory
endif
all:
.version: FORCE
$(Q)./describe.sh > .$@-tmp
$(Q)cmp -s $@ .$@-tmp || cp .$@-tmp $@
$(Q)rm .$@-tmp
all: FORCE .version
$(Q)$(MAKE) -C loader
$(Q)$(MAKE) -C twilight
$(Q)$(MAKE) -C lego
$(Q)$(MAKE) -C batman
$(Q)$(MAKE) -C lsw
FORCE:
clean:
-rm -f .version
$(MAKE) -C loader clean
$(MAKE) -C twilight clean
$(MAKE) -C lego clean
$(MAKE) -C batman clean
$(MAKE) -C lsw clean