-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
74 lines (60 loc) · 2.32 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
export SHORTNAME := VNDS
export LONGNAME := Visual Novel Reader
export VERSION := 1.4.9
ICON := -b logo.bmp
EFS := $(CURDIR)/tools/efs/efs
#------------------------------------------------------------------------------
.SUFFIXES:
#------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM)
endif
include $(DEVKITARM)/ds_rules
export TARGET := $(shell basename $(CURDIR))
export TOPDIR := $(CURDIR)
.PHONY: $(TARGET).arm7 $(TARGET).arm9
#------------------------------------------------------------------------------
# main targets
#------------------------------------------------------------------------------
all: $(TARGET).nds $(TARGET)-EFS.nds
#------------------------------------------------------------------------------
dist: $(TARGET).nds
rm -rf vnds
@mkdir vnds
cp $(TARGET).nds vnds/
make clean
cp -r src/ vnds
cp -r skins/ vnds
cp -r manual/ vnds
#cp -r tools/ vnds
cp config.ini vnds
cp _default.ttf vnds
cp license.txt vnds
cp README vnds
cp logo.bmp vnds
#cp xmlParser-license.txt vnds
cp ChangeLog vnds
cp Makefile vnds
mkdir vnds/novels
find vnds/ -type d -name ".svn" -depth -exec rm -rf '{}' \;
tar czvf vnds-$(VERSION).tar.gz vnds/
$(TARGET)-EFS.nds: $(TARGET).nds
@ndstool -c $(TARGET)-EFS.nds -7 $(TARGET).arm7 -9 $(TARGET).arm9 $(ICON) "$(SHORTNAME);$(LONGNAME);$(VERSION)" -d $(CURDIR)/vnds
@$(EFS) $(notdir $@)
$(TARGET).nds: $(TARGET).arm7 $(TARGET).arm9
@ndstool -c $(TARGET).nds -7 $(TARGET).arm7 -9 $(TARGET).arm9 $(ICON) "$(SHORTNAME);$(LONGNAME);$(VERSION)"
#------------------------------------------------------------------------------
$(TARGET).arm7 : arm7/$(TARGET).elf
$(TARGET).arm9 : arm9/$(TARGET).elf
#------------------------------------------------------------------------------
arm7/$(TARGET).elf:
$(MAKE) -C src/arm7
#------------------------------------------------------------------------------
arm9/$(TARGET).elf:
$(MAKE) -C src/arm9
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
clean:
$(MAKE) -C src/arm9 clean
$(MAKE) -C src/arm7 clean
rm -f $(TARGET).ds.gba $(TARGET).nds $(TARGET)-EFS.nds $(TARGET).arm7 $(TARGET).arm9