Demo and Benchmark Documentation Engines
Demo and Benchmark Documentation Engines
» Introduction » Install Instructions »»Windows install instructions »»Generic install instructions »»»Introduction »»»Generic premake walkthrough »»»Static linking walkthrough » Developer Documentation » Simple Example » Graphics Engine Integration Examples » PAL Developer Documentation » PAL Publications


For operating systems other than Windows, such as BSD, Linux or Mac OS-X you need to download premake for your platform. Then edit the premake_generic.lua file and set the variable "lloc" to the path where all your packages are installed. (You may also need to edit each individual physics engines directory location). Then set the make_ENGINENAME to false if you do not have this physics engine library installed.

Then type:

./premake --file premake_generic.lua --target gnu

Change to the build/gnu directory and type "make". Read the walkthrough below for step by step instructions. (2007 PAL version).

^ top

Generic premake walkthrough

  1. Check out PAL. Eg:
    svn co https://pal.svn.sourceforge.net/svnroot/pal pal
    OR (older cvs version:)
    cvs -z3 -d:pserver:anonymous@pal.cvs.sourceforge.net:/cvsroot/pal co -P pal
  2. Download premake & install for your platform
    wget http://internode.dl.sourceforge.net/sourceforge/premake/premake-linux-3.7.tar.gz
  3. Edit 'lloc' in premake_generic.lua. Eg. set to:
  4. Run premake:
    premake --file premake_generic.lua --target gnu
  5. Go to build directory.
    cd build/gnu/
  6. Make PAL core libraries
    make libpal
  7. Make a pal example program, eg:
    make palbeginner
  8. Make a pal physics implementation, eg:
    make libpal_tokamak
  9. Try it out!
    cd ../../bin/debug/gnu
NOTE As of 2008, PAL's dynamic library capability for GCC is unsupported! (Inconsistent behaviour of GCC with passing non-abstract classes through DLL's)
Use the STATIC LINKING option instead!

^ top

Static linking walkthrough

Do you get: '.so: undefined symbol' errors? Or DLL not found errors? The dynamic linking implementation may not work on your platform. Lets try a static linking implementation:

  1. Set "static_example = true" in the premake_generic.lua
    (Note, the static_example uses tokamak by default. If you wish to try something else, you must:
    • Edit example/begin.cpp, to select your engine.
    • Modify premake_template.lua, at around line 600, set the "value" to the engine of your choice. (pENGINENAME, eg pNewton)
  2. Run premake:
    premake --file premake_generic.lua --target gnu
  3. Rebuild the example
    cd build/gnu/
    make palbeginner
  4. Try it out!
    cd ../../bin/debug/gnu
  5. Done! You should now get some output:

    Current box position is 1.50000 at time 0.02
    Current box position is 1.49412 at time 0.04
    Current box position is 1.48432 at time 0.06