1#////////////////////////////////////////////////////////////////////////// 2# 3# Filename: Makefile 4# Purpose: This is the makefile for GUItenMark. It will probably 5# work only with GNU make, and as far as compilers are 6# concerned, is intended to be used with GNU gcc. 7# Mods: 04/19/2008 RSB Began. 8# 05/09/2008 RSB Added GUItenMark-macosx target for 9# cross-compilation. 10# 06/01/2008 RSB Replaced all ".phony" with ".PHONY", as I 11# am informed (thanks, Jason Pollock!), that 12# ".phony" is not merely theoretically 13# incorrect, but also doesn't work on all 14# platforms. 15# 03/09/09 RSB Changed so that when *I* compile it, the 16# native-Linux version compiles for 32-bit 17# CPU even if I'm using a 64-bit machine 18# to compile it. changed the default target 19# so that only the native application is built 20# and added the all-archs target which will 21# instead build it for native Linux, Win32, 22# and Mac OS X. 23# 05/10/09 RSB Removed the explicit --unicode flag from the 24# Mac OS X build. It will still used Unicode 25# if that's the wxWidgets configuration 26# installed, but it caused failure on my 27# build-box. 28# 29# Copyright 2008-2009 Ronald S. Burkey <info@sandroid.org> 30# 31# This file is part of GutenMark. 32# 33# GutenMark is free software; you can redistribute it and/or modify 34# it under the terms of the GNU General Public License as published by 35# the Free Software Foundation; either version 2 of the License, or 36# (at your option) any later version. 37# 38# GutenMark is distributed in the hope that it will be useful, 39# but WITHOUT ANY WARRANTY; without even the implied warranty of 40# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 41# GNU General Public License for more details. 42# 43# You should have received a copy of the GNU General Public License 44# along with GutenMark; if not, write to the Free Software 45# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 46# 47# /////////////////////////////////////////////////////////// 48# IMPORTANT NOTE! 49# This Makefile builds not only a Linux version 50# of GUItenMark, but also Win32 and Mac OS X 51# versions of GUItenMark, and the Win32 and 52# builds are done on a Linux box! This 53# assumes that you have installed the Cross-Compiler 54# system of the "I'm Cross!" project (refer to 55# http://www.sandroid.org/imcross). I'm sure 56# that it's possible to build GUItenMark from 57# within Windows or Mac OS X, but I've not tried 58# it, and I'm sure this Makefile (while correct in 59# spirit) won't work in Windows or Mac OS X as-is, 60# and I don't care to offer any advice on the matter. 61# Linux is free, IMCROSS is free, so use them. 62# /////////////////////////////////////////////////////////// 63# 64#////////////////////////////////////////////////////////////////////////// 65 66 67ifndef DARWIN_VERSION 68DARWIN_VERSION=darwin9 69endif 70 71APPLIST=GUItenMark GUItenMark.exe GUItenMark-macosx 72CSOURCE=main.cpp GUItenMark.cpp 73CHEADERS=GUItenMark.h 74 75.PHONY: default 76default: GUItenMark 77 78.PHONY: all-archs 79all-archs: ${APPLIST} 80 81.PHONY: clean 82clean: 83 -rm ${APPLIST} 84 85# Note that the following is defined merely because when I build GUItenMark 86# I need it to be portable, and I happen to have wxGTK static libraries 87# installed. For someone merely compiling it for themself, that's not 88# something to worry about, so I don't set it in those cases. 89ifeq "${USER}" "rburkey" 90WXSTATIC=--static 91endif 92 93GUItenMark: ${CSOURCE} ${CHEADERS} Makefile 94 c++ -pipe -O2 -fno-strict-aliasing -std=c++11 ${ARCH32} \ 95 `/usr/local/bin/wxgtk3u-3.0-config ${WXSTATIC} --cxxflags` \ 96 ${CSOURCE} \ 97 `/usr/local/bin/wxgtk3u-3.0-config ${WXSTATIC} --libs` \ 98 -o $@ 99 100GUItenMark.exe: ${CSOURCE} ${CHEADERS} Makefile 101 i386-mingw32-c++ -pipe -O2 -fno-strict-aliasing -std=c++11 \ 102 `${IMCROSS_PATH}/i386-mingw32/bin/wx-config --static --cxxflags` \ 103 ${CSOURCE} \ 104 `${IMCROSS_PATH}/i386-mingw32/bin/wx-config --static --libs` \ 105 -o $@ 106 107GUItenMark-macosx: ${CSOURCE} ${CHEADERS} Makefile 108 powerpc-apple-${DARWIN_VERSION}-c++ -pipe -O2 -fno-strict-aliasing -std=c++11 \ 109 ${MAC_TARGETS} -isysroot ${IMCROSS_PATH}/mac/SDKs/MacOSX10.4u.sdk \ 110 `${IMCROSS_PATH}/mac/bin/wx-config --static --cxxflags` \ 111 ${CSOURCE} \ 112 `${IMCROSS_PATH}/mac/bin/wx-config --static --libs` \ 113 -o $@ 114 115 116