summaryrefslogtreecommitdiff
path: root/packages/libndsfpc/examples/debugging/exceptionTest/Makefile.fpc
blob: 6b938c2255f62a832f82e9fdda092324a9d2e0ae (plain)
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
#
#   Makefile.fpc for Free Pascal libndsfpc 2.x.y Examples
#

[target]
loaders=
programs=exceptionTest

[require]
packages=libndsfpc
tools=bin2s mmutil grit
nortl=y

[install]
fpcpackage=y

[compiler]
options=-Xm 

[default]
cpu=arm
target=nds
fpcdir=../../../../..

[clean]
files=*.elf *.o *.s *.nds *.nef *.h *.bin \
       $(BUILD)/*
units=*

[prerules]
BUILD = build
AUDIO_FILES = $(foreach dir,$(notdir $(wildcard audio/*.*)),$(CURDIR)/audio/$(dir))
GFX_FILES = $(foreach dir,gfx,$(notdir $(wildcard $(dir)/*.png)))

[rules]
.NOTPARALLEL:
all: direc fpc_all 
direc:
ifneq ($(BUILD), $(CURDIR))
        $(MKDIR) $(BUILD)
endif
soundbank.bin.o : $(AUDIO_FILES)
        @$(MMUTIL) $^ -d -o$(BUILD)/soundbank.bin -h$(BUILD)/soundbank.h
        $(BIN2S) $(BUILD)/soundbank.bin > $(BUILD)/soundbank.bin.s
        $(AS) -o $(BUILD)/soundbank.bin.o $(BUILD)/soundbank.bin.s

$(GFX_FILES).o: 
        $(GRIT) gfx/$(GFX_FILES) -fts -ff gfx/$(basename $(GFX_FILES)).grit -o$(BUILD)/$(GFX_FILES)
        $(AS) -o $(BUILD)/$(basename $(GFX_FILES)).o $(BUILD)/$(basename $(GFX_FILES)).s