summaryrefslogtreecommitdiff
path: root/build/compile.sh
blob: 50b57716613eb996c81e4af3928fef062f1a6ee4 (plain)
1
2
3
4
5
6
7
8
9
#! /bin/sh
INPATH=$1
INFILE=$(basename $1)
INFILENAME="${INFILE%.*}"
INEXT="${INFILE##*.}"
gcc -m32 -nostartfiles -nostdlib -ffreestanding "$INPATH" -o "tmp/$INFILENAME".o
objcopy -S -R .note.gnu.build-id -R .comment -O binary "tmp/$INFILENAME".o "bin/$INFILENAME".bin
rm "tmp/$INFILENAME".o