Pak Files

From LagoonWiki

Jump to: navigation, search

Pak Files

Goal: Pak files are high level makefiles, which are used to generate the actual makefiles. These are actually tcl scripts, which are run by updsrc.tcl

Source files are organized into a simple tree

  • target - compiled /linked into a .lib - with a corresponding .tac file describing which classes it contains
    • module - compiled into a .o
      • headers - .h files
      • files - .cc files

A handful of commands describes this tree. beginmodule $name_module - starts describing a module setdir $dirname - which directory in inc/src do these files live in setfile list<$filenames> - list of .cc files (- the .cc) to compile into this, must all be inside code/src/dir


Plain Pak File - imai.pak

#//---------------------------------------------------------------------------//
beginmodule nimai
    setdir imai
    setfiles   { nimai_main nimai_cmds imairesource imaiobjective imaiobjectivelink imaiobjectivespatial imaiobjectivecreate imaiobjectivehypo imaiobjectivegather imaiobjectivegroup imaiobjectivelink }
    setheaders { nimai                 imairesource imaiobjective imaiobjectivelink imaiobjectivespatial imaiobjectivecreate imaiobjectivehypo imaiobjectivegather imaiobjectivegroup imaiobjectivelink }
endmodule
#//---------------------------------------------------------------------------//
standardmodule nresourcecreator          imai
standardmodule nresourcecreatorexplicit  imai
standardmodule nresourcecreatorimtree    imai
standardmodule nobjectivecreator         imai
standardmodule nobjectivecreatorimplicit imai
standardmodule nobjectivecreatorimtree   imai
standardmodule nobjectivecreatorgather   imai
standardmodule nallocator                imai
standardmodule nallocatorgreedy          imai
#--------------------------------------------------------------------
begintarget imai
    settype package
    setmods {
        nimai
        nresourcecreator nresourcecreatorexplicit nresourcecreatorimtree
        nobjectivecreator nobjectivecreatorimtree nobjectivecreatorimplicit nobjectivecreatorgather
        nallocator nallocatorgreedy
    }
    setdepends                          { nkernel nnebula }
    setlibs_win32                       { nkernel.lib nnebula.lib }
    setlibs_unix                        { nkernel     nnebula     }
endtarget