Skip to content

Commit

Permalink
Script for compiling simple C apps
Browse files Browse the repository at this point in the history
  • Loading branch information
IanSeyler committed Jan 21, 2014
1 parent 5597c5d commit cfef472
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions appc.sh
@@ -0,0 +1,14 @@
#!/bin/sh
cd src/BareMetal-OS/programs/
gcc -c -m64 -nostdlib -nostartfiles -nodefaultlibs -fomit-frame-pointer -mno-red-zone -o $1.o $1.c
gcc -c -m64 -nostdlib -nostartfiles -nodefaultlibs -fomit-frame-pointer -mno-red-zone -o libBareMetal.o libBareMetal.c
ld -T app.ld -o $1.app $1.o libBareMetal.o
mv $1.app ../../../bin/
if [ $? -eq 0 ]; then
cd ../../../bin
./bmfs bmfs.image create $1.app 2
./bmfs bmfs.image write $1.app
cd ..
else
echo "Error"
fi

0 comments on commit cfef472

Please sign in to comment.