forked from FIX94/Nintendont
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
103 lines (88 loc) · 2.34 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
SUBPROJECTS := multidol kernel/asm resetstub \
fatfs/libfat-arm.a fatfs/libfat-ppc.a \
codehandler kernel kernelboot \
loader/source/ppc loader
.PHONY: all forced clean $(SUBPROJECTS)
all: loader
forced: clean all
# Force MacOS/Linux users to compile their own copy of bin2h
bin2h: bin2h
@echo " "
@echo "Building bin2h"
@echo " "
$(MAKE) -C kernel/bin2h
multidol:
@echo " "
@echo "Building Multi-DOL loader"
@echo " "
$(MAKE) -C multidol
kernel/asm: bin2h
@echo " "
@echo "Building asm files"
@echo " "
$(MAKE) -C kernel/asm
resetstub:
@echo " "
@echo "Building reset stub"
@echo " "
$(MAKE) -C resetstub
fatfs/libfat-arm.a:
@echo " "
@echo "Building FatFS library for ARM"
@echo " "
$(MAKE) -C fatfs -f Makefile.arm
fatfs/libfat-ppc.a:
@echo " "
@echo "Building FatFS library for PPC"
@echo " "
$(MAKE) -C fatfs -f Makefile.ppc
codehandler: bin2h
@echo " "
@echo "Building Nintendont code handler"
@echo " "
$(MAKE) -C codehandler
kernel: kernel/asm fatfs/libfat-arm.a codehandler bin2h
@echo " "
@echo "Building Nintendont kernel"
@echo " "
$(MAKE) -C kernel
loader/source/ppc:
@echo " "
@echo "Building Nintendont HID"
@echo " "
$(MAKE) -C loader/source/ppc
kernelboot:
@echo " "
@echo "Building Nintendont kernelboot"
@echo " "
$(MAKE) -C kernelboot
loader: multidol resetstub fatfs/libfat-ppc.a kernel kernelboot loader/source/ppc
@echo " "
@echo "Building Nintendont loader"
@echo " "
$(MAKE) -C loader
clean:
@echo " "
@echo "Cleaning all subprojects..."
@echo " "
$(MAKE) -C multidol clean
$(MAKE) -C kernel/asm clean
$(MAKE) -C resetstub clean
$(MAKE) -C fatfs -f Makefile.arm clean
$(MAKE) -C fatfs -f Makefile.ppc clean
$(MAKE) -C codehandler clean
$(MAKE) -C kernel clean
$(MAKE) -C kernelboot clean
$(MAKE) -C loader/source/ppc clean
$(MAKE) -C loader clean