#******************************************************************************
#   File:
#      Makefile
#
#   $Revision: 1.13 $
#   $Header: F:\devel\pilot\clock/RCS/Makefile,v 1.13 1997/09/10 02:16:21 eshayne Exp $
#   $Log: Makefile,v $
# Revision 1.13  1997/09/10  02:16:21  eshayne
# fixed Creator ID to be a valid (not all lower-case) REGISTERED id
#
# Revision 1.12  1997/09/10  02:13:21  eshayne
# changed Creator ID to "ctim"
#
# Revision 1.11  1997/09/07  19:11:25  eshayne
# added GNU Public License to source files
#
# Revision 1.10  1997/09/07  18:09:34  eshayne
# linked creator-id in code to creator-id in Makefile
#
# Revision 1.9  1997/09/01  19:35:47  eshayne
# changed icon title to uppercase "Chess Timer"
#
# Revision 1.8  1997/09/01  14:45:39  eshayne
# added some dependencies on headers which were missing
#
# Revision 1.7  1997/09/01  14:44:18  eshayne
# added counter.c
#
# Revision 1.6  1997/09/01  14:40:27  eshayne
# added clockGlobals.c
#
# Revision 1.5  1997/08/20  01:58:47  eshayne
# added dependencies on clockResDefs.h
#
# Revision 1.4  1997/08/20  01:40:56  eshayne
# added -I. to CFLAGS
#
# Revision 1.3  1997/08/17  18:50:50  eshayne
# misc. cleanup
#
# Revision 1.2  1997/08/17  17:53:16  eshayne
# added comment header block
#
#
#    Chess Timer
#    Copyright (C) 1997  Ethan Shayne
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#******************************************************************************


# tools: compiler, etc.
CC = m68k-palmos-coff-gcc
PILRC = pilrc
TXT2BITM = txt2bitm
OBJRES = m68k-palmos-coff-obj-res
BUILDPRC = build-prc


# app-specific info
DATABASENAME = "Chess Timer"
CREATORID = CTim


# flags
CFLAGS = -O3 -I. -DCREATORID='$(CREATORID)'


# rules


# resources
#(common)
FORM_KEYWORD= tFRM
ICON_KEYWORD= tAIB

#(app specific)
MAINFORM_RESOURCE= $(FORM_KEYWORD)03e8
ICON_RESOURCE= $(ICON_KEYWORD)03e8


# targets
all: clock.prc

clock.prc: code0000.clock.grc code0001.clock.grc data0000.clock.grc pref0000.clock.grc $(MAINFORM_RESOURCE).bin $(ICON_RESOURCE).bin
	$(BUILDPRC) clock.prc $(DATABASENAME) $(CREATORID) code0001.clock.grc code0000.clock.grc data0000.clock.grc *.bin pref0000.clock.grc

code0000.clock.grc: clock
	$(OBJRES) clock

code0001.clock.grc: clock
	$(OBJRES) clock

data0000.clock.grc: clock
	$(OBJRES) clock

pref0000.clock.grc: clock
	$(OBJRES) clock

$(MAINFORM_RESOURCE).bin: clock.rcp clock.bmp clockResDefs.h
	$(PILRC) clock.rcp

$(ICON_RESOURCE).bin: clock.rcp clock.bmp clockResDefs.h
	$(PILRC) clock.rcp

clock.o: clock.c clockResDefs.h counter.h clockGlobals.h

clockGlobals.o: clockGlobals.c clockGlobals.h counter.h

counter.o: counter.c counter.h

clock: clock.o clockGlobals.o counter.o
	$(CC) $(CFLAGS) clock.o clockGlobals.o counter.o -o clock


# clean
clean:
	rm -rf *.o clock *.bin *.grc *.prc
