summaryrefslogtreecommitdiff
path: root/build/compile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/compile.sh')
-rwxr-xr-xbuild/compile.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/compile.sh b/build/compile.sh
new file mode 100755
index 0000000..efd8962
--- /dev/null
+++ b/build/compile.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+IN=$1
+FILE=$(basename $1)
+gcc -masm=intel -nostartfiles -nostdlib -ffreestanding "$IN".c -o "tmp/$FILE".o
+objcopy -S -R .note.gnu.build-id -R .comment -O binary "tmp/$FILE".o "bim/$FILE".bin
+rm "$IN".o
+