Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

Automate the build process

The SPARK build process described above is rather complex. As has been noted, the SPARK objects used in the problem are not known until the problem.pr file has been parsed. Moreover, the particular inverse functions from these objects that will actually be used in the numerical solution process are not known until setupcpp has completed. Thus the files to be compiled and linked are not knowable beforehand. Finally, when you make a change to the problem.pr file or any used class files, the build process should remake only the affected files.

To simplify matters, the process of building a SPARK solver is automated using facilities of the GNU make program, gmake, and a makefile called makefile.prj, found in the SPARK lib/ directory.

From the usage standpoint, gmake is straightforward. It will build an executable program from the specified problem.pr source file and then execute it with the command:

    gmake run <enter>
This is the most common usage of gmake in the SPARK context. However, there are other command line targets to meet special needs.

    run 
To make a run using problem.inp as input and problem.run as run control file. If problem.run is missing, a default one is created.

    (none)      
After the first time, rebuilds makefile.inc and the solver executable as needed using the previous SPARK_CLASSPATH.

    PROJ=xxxx  SPARK_CLASSPATH=../class 
To create the file makefile.inc and the solver executable that has the same name as xxxx.

    SPARK_STATIC_BUILD=yes 
To make the solver executable problem.exe for a statically-built problem.

    SPARK_DEBUG=yes
To make the solver executable that uses the DEBUG version of the solver library. In DEBUG mode, the SPARK solver generates a detailed log file called debug.log that describes the simulation process in great detail.

    solver      
To make the solver executable

    stp 
To make problem.stp file.

    makefile.inc        
To create makefile.inc file.

    pkg 
To create an export package in ../problem_pkg directory where problem is the name of the problem under study.

    prf 
To make problem.prf file.

    clean       
To delete all intermediate files.

    cleanALL    
Same as clean, but also deletes all run subdirectories.

    help
To show the help information about the list of targets.

See Makefile for more information.


Generated on 5 Nov 2003 for VisualSPARK 2.01