micro-utils/build.sh

24 lines
435 B
Bash
Raw Normal View History

2024-07-01 10:23:00 +00:00
#!/bin/sh
2024-07-13 11:43:49 +00:00
if [ -z $CC ]; then
CC="cc"
fi
if [ -z $CFLAGS ]; then
CFLAGS="-s -Os -Wextra -Wall -pedantic"
fi
2024-07-09 19:33:45 +00:00
2024-10-26 12:05:11 +00:00
chmod -v +x clean.sh ./scripts/build-box.sh ./libmu/build-libmu.sh
./clean.sh
2024-07-09 19:33:45 +00:00
./libmu/build-libmu.sh
2024-07-01 10:23:00 +00:00
2024-07-13 11:43:49 +00:00
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