forked from FIX94/Nintendont
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
89 lines (76 loc) · 2.03 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
#---------------------------------------------------------------------------------
# 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 \
loader/source/ppc loader
.PHONY: all forced clean $(SUBPROJECTS)
all: loader
forced: clean all
multidol:
@echo " "
@echo "Building Multi-DOL loader"
@echo " "
$(MAKE) -C multidol
kernel/asm:
@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:
@echo " "
@echo "Building Nintendont code handler"
@echo " "
$(MAKE) -C codehandler
kernel: kernel/asm fatfs/libfat-arm.a codehandler
@echo " "
@echo "Building Nintendont kernel"
@echo " "
$(MAKE) -C kernel
loader/source/ppc:
@echo " "
@echo "Building Nintendont HID"
@echo " "
$(MAKE) -C loader/source/ppc
loader: multidol resetstub fatfs/libfat-ppc.a kernel 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 loader/source/ppc clean
$(MAKE) -C loader clean