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
|
OBJS = pilrctst.o
BPREFIX = "-B$(DESTDIR)/usr/lib/gcc-lib/"
CC = $(DESTDIR)/$(TOOLDIR)/m68k-palmos-coff-gcc $(BPREFIX)
#uncomment this if you want to build a gdb debuggable version
DEFINES = -DDEBUG
INCLUDES = -I ../PalmOS2 \
-I../PalmOS2/UI -I../PalmOS2/System -I../PalmOS2/Hardware
CSFLAGS = -O2 -S $(DEFINES) $(INCLUDES)
CFLAGS = -O2 -g $(DEFINES) $(INCLUDES)
LIBS = -L../$(LIBCDIR) -L../$(LIBGLIBDIR)
PILRC = ../pilrc
TXT2BITM = ../txt2bitm
OBJRES = ../obj-res
BUILDPRC = ../build-prc
ICONTEXT = "pilrc test"
APPID = plRc
PRC = pilrctst.prc
all: $(PRC)
.S.o:
$(CC) $(TARGETFLAGS) -c $<
.c.s:
$(CC) $(CSFLAGS) $<
$(PRC):
$(PRC).foo: code.stamp bin.stamp
$(BUILDPRC) $@ $(ICONTEXT) $(APPID) *.grc *.bin
code.stamp: pilrctst
$(OBJRES) pilrctst
touch code.stamp
bin.stamp: pilrctst.rcp
$(PILRC) pilrctst.rcp
touch bin.stamp
pilrctst: $(OBJS)
ln -sf ../$(LIBGLIBDIR)/crt0.o crt0.o
ln -sf ../$(LIBGLIBDIR)/gcrt0.o gcrt0.o
$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
clean:
rm -rf *.[oa] pilrctst *.bin *.stamp *.[pg]rc
|