Deveopment Setup in MacOSX
From CwWiki
Contents |
Build Dependent Libraries
For most of the required libraries, you can install from sources downloaded in URLs provided. Or, you can install the pre-built packages from differnt packaging system available in MacOSX, like Fink and Darwinports. In theory both way works well, but using Darwinports would be the suggested way as the examples shown in building Corelyzer.
Fink
Download and install Fink from its website Use the following command to install libraries: freetype, zlib, libjpeg, libpng, libtiff
fink install freetype2 freetype2-dev zlib libjpeg libjpeg-shlibs libpng3 libpng-shlibs libtiff libtiff-shlibs
MacPorts
Download and install MacPorts from its website Use the following command to install libraries: freetype, zlib, libjpeg, libpng, libtiff
port install freetype zlib jpeg libpng tiff squish
Be aware that unlike Fink, Darwinport will download the sources and apply required patches automatically and then build all packages after you issue the above command.
squish
At the time the documents is written, the "squish" library is not included in both above package system yet. So developer will need to download and build "squish" library by themself. <p/>
Now squish library is in MacPorts, portfile maintained by me (julian9@gmail.com). So you can just use MacPorts doing
sudo port install squish
to install squish library. In default, it will be installed in /opt/local .
Build Corelyzer
Change to Corelyzer source code directory. Edit ${CORELYZER_SRC}/cppsrc/makefile to meet your path setup like the following. In this example, Darwinports packages are used.
cd corelyzer vim cppsrc/makefile
1 ifeq ($(SYSTEM),Darwin) 2 ENVP = MACOSX_DEPLOYMENT_TARGET=10.3 3 PNG_INC = -I/opt/local/include 4 JPEG_INC = -I/opt/local/include 5 TIFF_INC = -I/opt/local/include 6 OPENGL_INC = -FOpenGL 7 SQUISH_INC = -I/Users/julian/local/include 8 FREETYPE_INC= -I/opt/local/include \ 9 -I/opt/local/include/freetype2 10 INCLUDE_DIR = -I. -I../cppinclude $(TIFF_INC) $(JPEG_INC) $(PNG_INC) \ 11 -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers \ 12 $(OPENGL_INC) $(FREETYPE_INC) $(SQUISH_INC) 13 14 15 PNG_LIB = /opt/local/lib/libpng12.a 16 JPEG_LIB = /opt/local/lib/libjpeg.a 17 TIFF_LIB = /opt/local/lib/libtiff.a 18 OPENGL_LIB = -framework OpenGL 19 SQUISH_LIB = /Users/julian/local/lib/libsquish.a 20 FREETYPE_LIB= /opt/local/lib/libfreetype.a 21 ZLIB_LIB = /opt/local/lib/libz.a
Then in Corelyzer source root directory, type "make" to build all the codes.
make; make run

