-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (55 loc) · 1.56 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
67
# Wii U Linux Launcher
#
# Copyright (C) 2017 Jonathan Neuschäfer <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program, in the file LICENSE.GPLv2.
ifeq ($(strip $(DEVKITPPC)),)
PREFIX := powerpc-linux-gnu-
else
PATH := $(DEVKITPPC)/bin:$(PATH)
PREFIX := powerpc-eabi-
endif
CC := $(PREFIX)gcc
AS := $(PREFIX)as
LD := $(PREFIX)ld
CFLAGS := -ffreestanding -I dynamic_libs -I include -O2 -mcpu=750 -meabi -Wall
LDFLAGS := --as-needed -T link.ld --nmagic
ASFLAGS := -mregnames
OBJS=\
crt0.o \
dynamic_libs/fs_functions.o \
dynamic_libs/os_functions.o \
dynamic_libs/sys_functions.o \
dynamic_libs/vpad_functions.o \
fs.o \
hax.o \
keyboard.o \
main.o \
purgatory.o \
settings.o \
string.o \
version.o \
all: linux.elf meta/meta.xml
linux.elf: $(OBJS) link.ld
$(LD) $(LDFLAGS) $(OBJS) -o $@
main.o: arm/arm.xxd
arm/arm.xxd:
$(MAKE) -C arm arm.xxd
meta/meta.xml: meta/meta.xml.sh
$< > $@
version.c: version.c.sh
./version.c.sh > $@
clean:
rm -f linux.elf meta/meta.xml *.o version.c dynamic_libs/*.o
$(MAKE) -C arm clean
.PHONY: version.c meta/meta.xml arm/arm.xxd clean