LProf can be built and run on Mac OS X. Version 10.4 has been tested, but 10.5 should work and 10.3.9 might. Currently only the CMake build has been tested, though the SCons build might also work. Mac OS X support is a little rough at the moment but should improve quickly.

You will need to have the XCode development tools installed to build lprof. You can get them from http://developer.apple.com/tools/xcode/ . It's a big download, but it's more up to date than the version that came on your system CDs so it's worth enduring the wait.


You will also need to obtain some third party libraries to build lprof on Mac OS X. They're easily obtained via MacPorts. I suggest downloading the .dmg installer for MacPorts from http://www.macports.org/install.php , opening the .dmg, and running it. Once MacPorts has finished installing, run the following two commands from the Terminal to install libtiff and libusb.

	sudo /opt/local/bin/port install tiff
	sudo /opt/local/bin/port install libusb


Now you need to obtain Qt from TrollTech. While Qt can be installed using MacPorts, it's recommended that you download the latest binaries from TrollTech instead. It's also a lot quicker. You can get Qt 4 for Mac .dmg packaged binaries at http://trolltech.com/downloads/opensource . MAKE SURE YOU GET THE .dmg FILE NOT THE .tar.gz SOURCE FILES (unless you want to compile Qt yourself, of course). Once you've downloaded the dmg, mount it and run the installer it contains.


To compile lprof on Mac OS X, you will also require the CMake build system. You can download a Mac OS X .dmg installer from cmake.org - see http://www.cmake.org/HTML/Download.html . As usual, open the downloaded .dmg and run the installer.


You now have the various programs and libraries needed to compile lprof. To do the actual compile, open the Terminal and cd to the folder where you unpacked the lprof tarball or checked out the source from cvs. Do not cd into the lprof folder its self, just to the folder that contains it.  The following instructions will assume that the folder with the lprof README file etc in it is called "lprof", so you might need to change them a little if yours is different.

	mkdir lprof-build
	cd lprof-build
	cmake -DCMAKE_INCLUDE_PATH="/opt/local/include" -DCMAKE_LIBRARY_PATH="/opt/local/lib"  ../lprof
	make

If the compile completes without errors you need to run "sudo make install" to install it. Current versions don't make a .app bundle in Applications with a program icon etc, but they do work. To run lprof after installation, run:

	open /usr/local/bin/lprof


If you prefer to use XCode, follow the instructions as above but run `cmake' with -G xcode and then open the generated project file, eg:

	cmake -G Xcode -DCMAKE_INCLUDE_PATH="/opt/local/include" -DCMAKE_LIBRARY_PATH="/opt/local/lib"  ../lprof
	open lprof.xcodeproj
