-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (60 loc) · 1.71 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
# Makefile
CREATORID = CGLF
FILENAME = MiniGolf
SRCFILES = $(wildcard sauce/*.c) $(wildcard sauce/game/*.c) $(wildcard sauce/startscreen/*.c)
HIRES = false
# Palm SDK config
SDK_VERSION = 5
PALMCC = m68k-palmos-gcc
PALMINC = /opt/palmdev/sdk-5r3/include
PILRC = /usr/bin/pilrc
PALMCFLAGS = -O2 -DPALMOS -DSDK_$(SDK_VERSION)=1 \
-I$(PALMINC) \
-I$(PALMINC)/Dynamic \
-I$(PALMINC)/Core \
-I$(PALMINC)/Core/UI \
-I$(PALMINC)/Core/Hardware \
-I$(PALMINC)/Core/System \
-I$(PALMINC)/Core/System/Unix \
-I$(PALMINC)/Libraries \
-I$(PALMINC)/Libraries/PalmOSGlue \
-I$(PALMINC)/Libraries/Lz77 \
-I$(PALMINC)/Libraries/ExgLocal \
-I$(PALMINC)/Libraries/Sms \
-I$(PALMINC)/Libraries/Pdi \
-I$(PALMINC)/Libraries/Telephony \
-I$(PALMINC)/Libraries/Telephony/UI \
-I$(PALMINC)/Libraries/INet \
-I$(PALMINC)/Extensions \
-I$(PALMINC)/Extensions/ExpansionMgr
WARNINGFLAGS = -Wswitch -Wunused
all:
$(MAKE) EXT="_lowres" HIRES=false build
$(MAKE) EXT="_hires" HIRES=true PILRCFLAGS="-D PALMHIRES" GCCFLAGS="-DHIRESBUILD" build
$(MAKE) debug
debug:
$(MAKE) EXT="_debug" HIRES=false GCCFLAGS="-DDEBUG" build
build: compile prebin bin gen_grc combine cleanup
compile:
$(PALMCC) $(GCCFLAGS) $(PALMCFLAGS) ${WARNINGFLAGS} $(SRCFILES)
ifeq ($(HIRES), true)
prebin:
./generateBitmaps.sh
./generateResourceFile.sh --hires
else
prebin:
./generateBitmaps.sh
./generateResourceFile.sh
endif
bin:
$(PILRC) $(PILRCFLAGS) resources/ui.rcp
$(PILRC) $(PILRCFLAGS) resources/graphicResources.rcp
gen_grc:
m68k-palmos-obj-res a.out
combine:
build-prc artifacts/$(FILENAME)$(EXT).prc "$(FILENAME)" $(CREATORID) *.a.out.grc *.bin
cleanup:
rm *.grc *.out *.bin
rm -Rf resources/assets
rm -Rf resources/144
rm resources/graphicResources.rcp