Main Page | Related Pages

Usage

When invoked, acgmake recursively traverses a whole subtree of dirctories, starting at the current one. Each directory containing an ACGMakefile will be processed.

acgmake assumes that the current directory is part of a larger source code tree and tries to find the top-level directory of that project by going up the hierarchy until a file ACGMakefile.proj is found. If this file is found it will be included, so you can place additional project-specific configuration there. Additionally the include and library paths is extended by the parent directory of the project directory. E.g. if you have a directory structure like this

projects/
|-- proj_1
|   |-- ACGMakefile
|   |-- ACGMakefile.proj
|   |-- code
....
|-- proj_2
|   |-- ACGMakefile
|   |-- ACGMakefile.proj
|   |-- code
...

and you call acgmake from the projects/proj_1/code/ directory, acgmake will find projects/proj_1/ as the project top-level directory and add projects/ to your include and lib paths. This means you can include files like

#include <proj_1/some_dir/some_file.hh>
#include <proj_2/some_other_dir/some_other_file.hh>

and use code/libs from other directories like explained below.

Attention:
This nice functionality requires that you place a (possibly empty) file named ACGMakefile.proj in the top-level directory of your projects.
The make-files named ACGMakefile control what to do for these directories (e.g. what modules to apply, see List of Modules), the command line options tell acgmake how to do it. E.g., the module cxx used for C++ code generation will build a library from all the *.cc files for each directory, files containing a main() function will be detected, compiled, and linked to applications.



Usually you call acgmake with a list of options and a list of targets. The options controll the code compilation process as well as the linking behaviour. The targets tell acgmake what to do, the options tell how to do it.

The options controlling the C / C++ code compilation are:

: Use a specific compiler. Causes the file /ACG/acgdev/acgmake/configs/config. to be included. You can specify compiler specific settings there.

The type of library/executable generation can be set by:

Output options: Other options:

: This will cause make to run <n> compilation jobs at once.

Supported targets are:

In each directory tp be processed acgmake will look for a file named ACGMakefile. The syntax will be plain GNU make syntax. A typical makefile looks like this.

#==  SYSTEM PART -- DON'T TOUCH  ==============================================
include $(ACGMAKE)/Config
#==============================================================================


SUBDIRS = $(call find-subdirs)

PACKAGES := qt glut opengl x11 math

PROJ_LIBS = OpenMesh ACG/Scenegraph

MODULES := uic moc cxx


#==  SYSTEM PART -- DON'T TOUCH  ==============================================
include $(ACGMAKE)/Rules
#==============================================================================

As you see you have to specify only four parameters:

Attention:
For the variables PACKAGES, PROJ_LIBS and MODULES the order is important. While the order in wich modules are to apply is quite obvious, a wring order of packages and libraries can lead to undefined symbols during linking. If one package/library depends on one another, the other should be given later in the string, like "glut opengl" instead of "opengl glut". This may only lead to errors when you compile static libs using the -static command line option.
In addition any internal (module specific) variables can be overridden. For example if you have specific options for a certain compiler or operating system, you could do something like this:

ifeq ($(CXX_COMP),g++)
  CXX_DEFS += -ftemplate-depth-100
endif 

ifeq ($(OS),Linux)
  Some Linux specific stuff
endif

acg pic Project acgmake, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .