How to compile CHomP with wxWidgets on Mac
(by Zin Arai*)

There are two important points.

 1. Use gcc-3.3 instead of gcc-4.0.1 (the default for OSX 10.4).
 [update: gcc-4.0.1 works fine in OSX 10.5, so this step is not necessary]

 It's not enough to set environment variable CC and CXX but we also
 need to take care of library dependencies. A convenient way is to
 use 'gcc_select' command (see the example).
 2. Configure wxWidgets so that it uses X11 API instead of OSX native
 API (Carbon, Cocoa).
 The following example worked fine on my OSX 10.4 machines.
 -------------------------------- EXAMPLE ---------------------------------------
 # select gcc 3.3
 sudo gcc_select 3.3
 # make wxWidgets (wxWidgets-2.6.4 also works)
 # [note that it may be necessary to provide the full path
 # in place of ~/wx, e.g., /Users/username/wx]
 mkdir ~/wx
 tar xvzf wxWidgets-2.8.4.tar.gz
 cd wxWidgets-2.8.4/
 ./configure --with-x11 --with-opengl --disable-shared --prefix=~/wx
 make && make install
 # make chomp (see below for the definition of 'wxmac')
 tar xvzf chomp-full.tar.gz
 cd chomp-full
 make target=wxmac
 # restore the system default
 sudo gcc_select 4.0
 -------------------------------- EXAMPLE ---------------------------------------
 Here is the config file 'wxmac'. Note that the path for wxWidgets
 is hard-coded in the script (~/wx). This is to avoid
 using the system default wxWidgets (/usr/bin/wx-config).
 [note that it may be necessary to replace ~/wx with the absolute
 path (like /User/username/wx); please, see the file "wxmac"
 provided with CHomP for additional options necessary in OSX 10.5]
 ------------------------ chomp-full/make/config/wxmac --------------------------
 WX = ~/wx
 SYSLIB = `$(WX)/bin/wx-config --libs`
 SYSLIBG = `$(WX)/bin/wx-config --libs --gl_libs` -L/usr/X11R6/lib -lGL
 SYSINCL = `$(WX)/bin/wx-config --cxxflags` -I/usr/X11R6/include/ -I/usr/X11R6/include/GL
 CXX = g++
 COMPILE = $(CXX) -O2 -Wall
 LINK = $(CXX) -s
 LINKGUI = $(CXX) -s
 MAKELIB = ar cru
 IDXLIB = ranlib
 REMOVE = rm -f
 MKDIR = mkdir
 EXE =
 LIBEXT = .a
 OBJEXT = .o
 ------------------------ chomp-full/make/config/wxmac --------------------------

* With minor modifications and updates by Pawel Pilarczyk.