#
# Makefile for the TicTacToe game.
#

CC=m68k-palmos-coff-gcc
CFLAGS=
LD=m68k-palmos-coff-gcc
OBJRES=m68k-palmos-coff-obj-res

OBJS=tictactoe.o circle.o

all: tictactoe.prc

.c.o:
	$(CC) $(CFLAGS) -O1 -c $<

tictactoe.prc: timestamp-grc timestamp-res
	build-prc tictactoe.prc "TicTacToe" TTT9 *.grc *.bin

timestamp-res: tictactoe.rcp
	pilrc tictactoe.rcp
	touch timestamp-res

timestamp-grc: $(OBJS)
	$(CC) -O1 $(OBJS) -o tictactoe
	$(OBJRES) tictactoe
	touch timestamp-grc

tictactoe.c: tictactoe.h

tictactoe.rcp: tictactoe.h

clean:
	rm -f *~
	rm -f tictactoe $(OBJS)
	rm -rf *.grc *.bin
	rm -f timestamp-grc timestamp-res

distclean: clean
	rm -f tictactoe.prc
