-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
64 lines (49 loc) · 1.9 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
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
.SECONDARY:
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
include $(DEVKITARM)/ds_rules
export TARGET := GodMode9i
export GAME_TITLE := $(TARGET)
export NITRODATA := nitrofiles
.PHONY: all bootloader bootstub clean dsi arm7/$(TARGET).elf arm9/$(TARGET).elf
all: bootloader bootstub $(TARGET).nds
dsi: $(TARGET).dsi
$(TARGET).nds: arm7/$(TARGET).elf arm9/$(TARGET).elf
ndstool -c $(TARGET).nds -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf -d $(NITRODATA) \
-b icon.bmp "GodMode9i;Rocket Robz" \
-z 80040000
$(TARGET).dsi: arm7/$(TARGET).elf arm9/$(TARGET).elf
ndstool -c $(TARGET).dsi -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf -d $(NITRODATA) \
-b icon.bmp "GodMode9i;Rocket Robz" \
-g HGMA 00 "GODMODE9I" -z 80040000 -u 00030004
#---------------------------------------------------------------------------------
arm7/$(TARGET).elf:
@$(MAKE) -C arm7
#---------------------------------------------------------------------------------
arm9/$(TARGET).elf:
@$(MAKE) -C libnds32 release
@$(MAKE) -C arm9
#---------------------------------------------------------------------------------
#$(BUILD):
#@[ -d $@ ] || mkdir -p $@
#@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr data/*.bin
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).nds
@rm -fr $(TARGET).arm7.elf
@rm -fr $(TARGET).arm9.elf
@$(MAKE) -C libnds32 clean
@$(MAKE) -C bootloader clean
@$(MAKE) -C bootstub clean
@$(MAKE) -C arm9 clean
@$(MAKE) -C arm7 clean
bootloader: data
@$(MAKE) -C bootloader LOADBIN=$(CURDIR)/data/load.bin
bootstub: data
@$(MAKE) -C bootstub