fixed build.sh
This commit is contained in:
parent
0737916f1a
commit
500bbb02ea
4 changed files with 26 additions and 22 deletions
24
build.sh
24
build.sh
|
@ -1,11 +1,23 @@
|
|||
#!/bin/sh
|
||||
CFLAGS="-s -Os -Wextra -Wall -pedantic"
|
||||
CC="cc"
|
||||
./clean.sh
|
||||
|
||||
if [ -z $CC ]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
if [ -z $CFLAGS ]; then
|
||||
CFLAGS="-s -Os -Wextra -Wall -pedantic"
|
||||
fi
|
||||
|
||||
chmod +x ./libmu/build-libmu.sh
|
||||
./libmu/build-libmu.sh
|
||||
|
||||
for i in $(ls src); do
|
||||
echo "CC $i"
|
||||
echo $CFLAGS | xargs $CC -Iconfigs -Ilibmu src/$i -o bin/$(basename $i .c) obj/*.o
|
||||
done
|
||||
if [[ $1 == "box" ]]; then
|
||||
env CC="$CC" CFLAGS="$CFLAGS" ./scripts/build-box.sh
|
||||
|
||||
else
|
||||
for i in $(ls src); do
|
||||
echo "CC $i"
|
||||
echo $CFLAGS | xargs $CC -Iconfigs -Ilibmu src/$i -o bin/$(basename $i .c) obj/*.o
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue