compile: add program arguments passed to C compiler; gcc's -l, -L, -I and -c
[nit.git] / src / compiling / compiling.nit
index 5391fb0..5b3fd7f 100644 (file)
@@ -94,6 +94,10 @@ redef class Program
                        f.write(" -o {module.name}_{tc.ext_prefix}")
                end
                if tc.boost then f.write(" -O")
+               if not tc.cc_link then f.write(" -x \"-c\"")
+               for l in tc.cc_libs do f.write(" -x \"-l {l}\"")
+               for lp in tc.cc_lib_paths do f.write(" -x \"-L {lp}\"")
+               for ip in tc.cc_include_paths do f.write(" -x \"-I {ip}\"")
                f.write(" \"$@\" \\\n  {files.join("\\\n  ")}\n")
                f.close