-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
104 lines (77 loc) · 2.18 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.SUFFIXES: .xbm .bmp .rcp .dir
ENG=ricochet.prc
TARGETS=$(ENG)
LANG=eng
PROG = ricochet
ZIP = ricochet.zip
SRCTAR = ricochetSrc.tar.gz
SRCS = board.c layout.c main.c move.c random.c shuffle.c
OBJS = board.o layout.o main.o move.o random.o shuffle.o
HDRS = ricochet.h ricochetRsc.h
BMPS = robotActive.bmp \
robotPassive.bmp \
target.bmp
RES = ricochetRsc.rcp
ICONS = ricochet1bpp.bmp
DOC = readme.txt
BUILD = Makefile $(SRCS) $(HDRS) $(BMPS) $(RES) $(ICON) $(DOC)
RLOC= rloc0000.$(PROG).grc
GRCS = code0000.$(PROG).grc code0001.$(PROG).grc data0000.$(PROG).grc $(RLOC)
PREF= pref0000.$(PROG).grc
PREFIX = /usr/m68k-palmos
TOOLS= $(PREFIX)/bin
SDKFIND=$(TOOLS)/sdkfind
#TOOLS= /local/src/prc/prc-tools-0.4.2
CC = $(TOOLS)/gcc
#uncomment this if you want to build a gdb debuggable version
#DEFINES = -DDEBUG
DEFINES = -DNDEBUG
CSFLAGS = -O2 -S $(DEFINES)
CFLAGS = -O2 `$(SDKFIND)` $(DEFINES) -Wall -Wstrict-prototypes -fno-builtin
#LIBS = $(LDIR) -lgdb -lc -lmf -lgcc
PILRC = pilrc
TXT2BITM = $(TOOLS)/txt2bitm
OBJRES = $(TOOLS)/obj-res
#OBJRES = $(TOOLS)/obj-res
#BUILDPRC = $(TOOLS)/build-prc
BUILDPRC = build-prc
#BUILDPRC = /local/src/prc/prc-tools-0.4.2/build-prc
ICONTEXT = "Ricochet"
APPID = Rico
.S.o:
$(CC) $(TARGETFLAGS) -c $<
.c.s:
$(CC) $(CSFLAGS) $<
.xbm.bmp:
xbmtopbm $< | ppmtobmp -windows > $@
all: $(TARGETS)
$(ZIP): $(TARGETS) $(DOC)
zip $@ $(TARGETS) $(DOC)
$(SRCTAR): $(BUILD)
tar czf $(SRCTAR) $(BUILD)
$(ENG): eng
cd eng && $(BUILDPRC) ../$@ $(ICONTEXT) $(APPID) $(GRCS) *.bin $(PREF)
eng: $(RES) $(BMPS) ricochetRsc.h $(GRCS)
rm -rf $@
mkdir $@
$(PILRC) -L $@ $(RES) $@
cp $(GRCS) $(PREF) $@
$(IT): it
cd it && $(BUILDPRC) ../$@ $(ICONTEXT) $(APPID) $(GRCS) *.bin $(PREF)
it: $(RES) $(BMPS) ricochetRsc.h $(GRCS)
rm -rf $@
mkdir $@
$(PILRC) -L $@ $(RES) $@
cp $(GRCS) $(PREF) $@
$(ICONRES): $(ICON)
$(TXT2BITM) $(ICON)
$(GRCS): $(PROG)
$(OBJRES) $(PROG)
$(PROG): $(OBJS)
# $(CC) -Wl,-M -Wl,-r -Wl,-dc $(CFLAGS) $(OBJS) -o $(PROG) $(LIBS)
$(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(LIBS)
$(OBJS): $(HDRS)
spider.o spiderette.o: spider.h
klondike.o vegas.o: klondike.h
clean:
rm -rf MakeOut $(OBJS) $(TARGETS) $(PROG) $(LANG) $(GRCS) $(PREF) $(ZIP) $(SRCTAR)