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
This commit is contained in:
Norayr Chilingarian 2013-10-07 16:46:04 +04:00
parent cb804b16cb
commit a3214b8154
4 changed files with 32 additions and 18 deletions

View file

@ -234,6 +234,13 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
IF lineno IN opt THEN useLineNo := TRUE; curpos := 256; errpos := curpos; lasterrpos := curpos - 10
ELSE useLineNo := FALSE;
END;
IF useparfile IN opt THEN useParFile := TRUE ELSE useParFile := FALSE END; (* this check must be made before calling getproperties, noch *)
IF dontasm IN opt THEN dontAsm := TRUE ELSE dontAsm := FALSE END;
IF dontlink IN opt THEN dontLink := TRUE ELSE dontLink := FALSE END;
IF mainprog IN opt THEN mainProg := TRUE ELSE mainProg := FALSE END;
IF mainlinkstat IN opt THEN INCL(glbopt, mainprog); mainLinkStat := TRUE ELSE mainLinkStat := FALSE END;
END InitOptions;
PROCEDURE Init*(VAR done: BOOLEAN; VAR mname : ARRAY OF CHAR); (* get the source for one translation *)