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:
This is the most common usage of gmake in the SPARK context. However, there are other command line targets to meet special needs.
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.
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
.
To make the solver executable problem.exe for a statically-built problem.
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.
To make the solver executable
To make problem.stp file.
To create makefile.inc file.
To create an export package in ../problem_pkg directory where problem is the name of the problem under study.
To make problem.prf file.
To delete all intermediate files.
Same as clean, but also deletes all run subdirectories.
To show the help information about the list of targets.
See Makefile for more information.