fixed issue with multiple modules compilation.

now voc adds dependency modules object files to the main module
compiling command line.
for example, if MM0 imports MM1 then if we call voc like:
voc -l MM1.Mod -s MM0.Mod -M

 the commandline will look like

cc  MM0.c MM1.o -static  -o MM0  -fPIC -g -I /opt/voc-1.0/src/lib/system/gnuc/x86_64  -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib


Former-commit-id: a3214b8154
This commit is contained in:
Norayr Chilingarian 2013-10-07 16:46:04 +04:00
parent d858f133f8
commit 745b4851ca
4 changed files with 32 additions and 18 deletions

View file

@ -94,7 +94,8 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *)
BEGIN
indentLevel := 0;
ptrinit := OPM.ptrinit IN OPM.opt;
mainprog := OPM.mainprog IN OPM.opt;
(*mainprog := OPM.mainprog IN OPM.opt;*)
mainprog := OPM.mainProg OR OPM.mainLinkStat;
ansi := OPM.ansi IN OPM.opt;
IF ansi THEN BodyNameExt := "__init(void)" ELSE BodyNameExt := "__init()" END
END Init;