Place build object files (Comiled Libraries etc.) in directory outside source tree
We want to place the files generated during build outside the source tree.
Therefore I have made a branch develop-objdir
, that is backward
compatible with develop
branch, except if environment variable OBJ
is set.
If environment variable OBJ
is set, it shall be set to some path, that
either exists, or can be created by the user running make
.
Makefile
and modelsim.ini
are stored in current directory as always.
Library files and Hdlmake dependency files (files touched by Hdlmake)
are stored in a sub-directory of OBJ
.
The build object files are not stored directly in OBJ
dir, but in subdriectory related to the project dir.
E.g having a git or svn project located in
/home/$USER/path/to/project_root/subrepo/folder_with_manifest
(subrepo only for git)
Then:
Simulation libraries will be stored under PROJ_OBJ=$OBJ/home/$USER/path/to/project_root/<tool_id>/
.
The subrepo is not used to determine the location of the build object files, only the main repository.
It have been tested for Modelsim and GHDL simulator. It is implemented for other simulators, but not tested, since I don't have those.