#//////////////////////////////////////////////////////////////////////////
#
# Filename:	Makefile 
# Purpose:	This is the makefile for GUItenMark.  It will probably
#		work only with GNU make, and as far as compilers are 
#		concerned, is intended to be used with GNU gcc.
# Mods:		04/19/2008 RSB	Began.
#
#  Copyright 2008 Ronald S. Burkey <info@sandroid.org>
#
#  This file is part of GutenMark.
#
#  GutenMark 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.
#
#  GutenMark 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 GutenMark; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# 	///////////////////////////////////////////////////////////
#				IMPORTANT NOTE!
#		This Makefile builds both a Linux version of 
#		GUItenMark and a Win32 version of GUItenMark,
#		but the Win32 build is done from Linux!  This
#		assumes that you have installed the Cross-Compiler
#		system of the "I'm Cross!" project (refer to
#		http://www.sandroid.org/imcross).  I'm sure 
#		that it's possible to build GUItenMark from 
#		within Windows itself, but I've not tried it,
#		and I'm sure this Makefile (while correct in
#		spirit) won't work in Windows as-is, and I
#		don't care to offer any advice on the matter.
#		Linux is free, IMCROSS is free, so use them.
#	///////////////////////////////////////////////////////////
#
#//////////////////////////////////////////////////////////////////////////


APPLIST=GUItenMark GUItenMark.exe
CSOURCE=main.cpp GUItenMark.cpp
CHEADERS=GUItenMark.h

.phony:  default
default: ${APPLIST}

.phony:  clean
clean:
	-rm ${APPLIST}

GUItenMark:  ${CSOURCE} ${CHEADERS} Makefile
	g++ `wx-config --cxxflags` ${CSOURCE} `wx-config --libs` -o $@
	strip $@
	-cp -a $@ *.jpg /home/${USER}/.GutenMark/binary

GUItenMark.exe:  ${CSOURCE} ${CHEADERS} Makefile
	i386-mingw32-g++ \
		`/usr/local/i386-mingw32/bin/wx-config --cxxflags` \
		${CSOURCE} \
		`/usr/local/i386-mingw32/bin/wx-config --libs` \
		-o $@
	i386-mingw32-strip $@
	-cp -a $@ /home/${USER}/.GutenMark/binary

