import frontend
import common_ffi
import platform
+import c_tools
# Add compiling options
redef class ToolContext
return w
end
end
+
+# An extern file to compile
+class ExternFile
+ # The filename of the file
+ var filename: String
+
+ fun makefile_rule_name: String is abstract
+ fun makefile_rule_content: String is abstract
+end
+
+# An extern C file to compile
+class ExternCFile
+ super ExternFile
+
+ init (filename, cflags: String)
+ do
+ super filename
+
+ self.cflags = cflags
+ end
+
+ # Additionnal specific CC compiler -c flags
+ var cflags: String
+
+ redef fun hash do return filename.hash
+ redef fun ==(o) do return o isa ExternCFile and filename == o.filename
+end
+
var c_linker_options writable = ""
end
-# An extern C file to compile
-class ExternCFile
- super ExternFile
-
- init (filename, cflags: String)
- do
- super filename
-
- self.cflags = cflags
- end
-
- # Additionnal specific CC compiler -c flags
- var cflags: String
-
- redef fun hash do return filename.hash
- redef fun ==(o) do return o isa ExternCFile and filename == o.filename
-end
-
class ForeignCType
super ForeignType
end
end
-# An extern file to compile
-class ExternFile
- # The filename of the file
- var filename: String
-
- fun makefile_rule_name: String is abstract
- fun makefile_rule_content: String is abstract
-end
-
redef class CCompilationUnit
fun write_as_impl( amodule: AModule, compdir: String )
do