move ExternFile to c_tools
authorJean Privat <jean@pryen.org>
Wed, 2 Apr 2014 00:06:57 +0000 (20:06 -0400)
committerJean Privat <jean@pryen.org>
Wed, 2 Apr 2014 13:51:06 +0000 (09:51 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/abstract_compiler.nit
src/c_tools.nit
src/common_ffi/c.nit
src/common_ffi/ffi_base.nit

index 0f854ba..cf73292 100644 (file)
@@ -23,6 +23,7 @@ import auto_super_init
 import frontend
 import common_ffi
 import platform
+import c_tools
 
 # Add compiling options
 redef class ToolContext
index 5d9c634..a44d7e5 100644 (file)
@@ -98,3 +98,31 @@ class CFunction
                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
+
index 661928c..2535fc9 100644 (file)
@@ -76,24 +76,6 @@ redef class AModule
        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
 
index 86f53ea..a34243e 100644 (file)
@@ -144,15 +144,6 @@ redef class TExternCodeSegment
        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