Combine all boot build stuff in a single scons tool
[senf.git] / senfscons / CombinedObject.py
diff --git a/senfscons/CombinedObject.py b/senfscons/CombinedObject.py
new file mode 100644 (file)
index 0000000..eaf3ce1
--- /dev/null
@@ -0,0 +1,16 @@
+
+def generate(env):
+
+    builder = env.Builder(
+        action = [ '$LDCOMBINECOM $TARGET $SOURCES' ],
+        suffix = '.o',
+        ensure_suffix = 1,
+        src_suffix = '.o',
+        src_builder = 'Object')
+
+    env['BUILDERS']['CombinedObject'] = builder
+
+    env.SetDefault(LDCOMBINECOM = 'ld -r -o')
+
+def exists(env):
+    return True