Professional Documents
Culture Documents
Buildsystem
Buildsystem
===========================================
2. Debug/Release builds
3. Out-of-directory builds
1. Generated makefiles
How do makefiles know the location of the config file? GNU Make makes it
possible to run a program during makefile preprocesssing, and assign its
output to a makefile variable (VAR=$(shell prog ...)). The generated
makefile uses the $(shell) syntax to invoke "opp_configfilepath" (part of
OMNeT++) which prints the location of the config file. Thus it is enough
if OMNeT++ is in the PATH, and no other setting, makefile editing or
makefile re-generation is needed.
3. Debug/release build
Other MODEs can be defined by the user (if s/he takes the effort). Makefiles
or opp_makemake do not enforce these names.
4. Out-of-directory build
Create softlinks (or batch file) into the current dir to the out/<executable>.
6. Shared libs
Models get compiled into a shared lib. E.g. "aloha.so"; and we'd generate
an "aloha" script with "opp_run aloha.so" as content; it would also set the
LD_LIBRARY_PATH to the appropriate lib/<configname>.
It could be possible to build INET with a single makefile; OBJS would contain
object files from all directories.