Using make to Link and CompileThe compile and link phase compiles the generated code and handwritten code into a library called
out_lib.a,
and links it with the runtime modules and the user-specified libraries into an executable prototype.Every time you modify your specification and generate code, you have to follow this procedure. The mechanism that manages this process is the make.
The advantage of make on “flat” compilations is that it can manage incremental compilation. That is, compiling only what is necessary due to the latest changes.
The input to make are two dependency files:
Makefile
andUser_Makefile
. They contain lists of files and dependencies that determine what has to be re-compiled after every change in the source files.The
Makefile
lists all the generated files that should remain intact. TheUser_Makefile
compiles theuser_activities
template and additional files added by the user.