Similar to the build of libraries we also support several variants of executables which are compiled using different compiler options.
Most importantly, the targets in this section are used to compile the generated file test/TestSuite.as, see 41.5.
The actual name of the executable should be given through the variable EXECUTABLE.
A typical call to build all the variants (Section 15.2) of the libraries would be the following.
$(MAKE) EXECUTABLE=TestSuite executablevariants
|
It will build all the variants as specified through the variable VARIANTSTOBUILD.
Such a call appears in test/Makefile.nw for the generation of the TestSuite executables.
The flags that go to the command line of the ALDOR compiler calls are separated into four classes.
The target executablevariants is used to build an executable of every variant given through the variable VARIANTSTOBUILD.
From now on we assume that the variable VARIANT is set and we build the platform-dependent executables. The target executablevariant.% is very similar to libraryvariant.%.
The name of the executable must be given through the variable EXECUTABLE.
The variable EXECFLAGS is similar to FLAGS and collects all the commandline parameters for the call of the ALDOR compiler.
We want to allow
make NAMEOFEXECUTABLE
|
and, therefore, check whether the variable EXECUTABLE has been set.
If the lib directory does not exist, it indicates that the library has not yet been built. So we are going to build it by making all on the top-level.
Since the lib directory is rebuilt each time the library has been compiled (see target all), it can be used as a time stamp for the previous target.