#	$Author: dizzy $
#	$Revision: 1.19 $
#	Last updated: $Date: 2000/11/16 19:02:27 $
#		
#	Copyright (C) 2000 Vlad Mereuta <dizzy@users.sourceforge.net>
#
#	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
#	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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#	$Log: Makefile,v $
#	Revision 1.19  2000/11/16 19:02:27  dizzy
#	Updated version number
#	
#	Revision 1.18  2000/11/16 02:38:32  chaese
#	Merged New Transaction and Transaction Details forms
#	
#	Revision 1.17  2000/11/15 18:58:42  dizzy
#	New balance adjust option in transaction form menu.
#	Help updated in Transaction form and Accounts form.
#	Merged ShowScrollArrows functions.
#	Updated a few variable and function names.
#	
#	Revision 1.16  2000/11/10 01:25:55  chaese
#	merged New Account and Account Details forms
#	
#	Revision 1.15  2000/10/27 22:35:58  dizzy
#	Updated to include a few documentation files and the license agreement in the zip archive.
#	
#	Revision 1.14  2000/10/27 22:29:20  dizzy
#	All records are sorted now; fake indentation in account view
#	
#	Revision 1.13  2000/10/21 14:39:37  dizzy
#	Updated version number
#	
#	Revision 1.12  2000/10/12 17:17:24  dizzy
#	Email address update; lots of bugfixes
#		
#	Revision 1.10  2000/10/11 20:46:57  dizzy
#	Few fixes in the menu and versioning; initial help
#	
#	Revision 1.9  2000/10/08 15:40:46  dizzy
#	Fixed a load of bugs related to transaction support.
#	Displaying i/e accounts in all view is optional.
#	

################################	
#	Makefile for palmcoins


Version = 0.3.6
CVS_ver = `echo "rel-$(Version)" | tr . _`

#directory containing resources
R = ../resources

CC = m68k-palmos-gcc
CFLAGS = -Wall -O2 -I $(R) -D ERROR_CHECK_LEVEL=2

OBJECTS = PalmCoins.o MiscFunc.o AccountsForm.o EditAccountForm.o AccountsDB.o \
	AccountsTable.o CoinsPref.o PreferencesForm.o TransactionsDB.o \
	TransactionsForm.o TransactionsTable.o EditTransactionForm.o
	
PalmCoins.prc:  tags tver0001.bin PalmCoins
	build-prc ../PalmCoins.prc "PalmCoins" DyCo PalmCoins *.bin

PalmCoins: $(OBJECTS)
	$(CC) $(CFLAGS) -o PalmCoins $(OBJECTS)

$(OBJECTS):  %.o: %.c %.h
	$(CC) $(CFLAGS) -c $<

tver0001.bin: $(R)/palmcoins.rcp $(R)/coinsIcon.bmp
	pilrc -q -I $(R) -H $(R)/PalmCoinsRsc.h $(R)/palmcoins.rcp
	
clean:
	rm -f PalmCoins *.o *.bin *~ $(R)/PalmCoinsRsc.h ../doc/*~
	rm -rf ../doc/html

doc:
	doxygen

fresh: clean PalmCoins.prc

all: PalmCoins.prc doc

#the targets below this line are used by the developer

#updates the version no of the program from the makefile
tags:
	./replace.pl $(R)/palmcoins.rcp "id 1 \"\d\.\d\.\d\"" "id 1 \"$(Version)\""
	./replace.pl $(R)/palmcoins.rcp "PalmCoins \d\.\d\.\d" "PalmCoins $(Version)"

cvstag:
	cd ..; cvs tag $(CVS_ver)


release: clean
	cd ../..; tar -c palmcoins > palmcoins-$(Version).tar; gzip palmcoins-$(Version).tar
	cd ../..; zip PalmCoins.zip palmcoins/PalmCoins.prc palmcoins/COPYING palmcoins/doc/TODO

install: PalmCoins.prc
	pilot-xfer -i ../PalmCoins.prc
