#!/bin/sh if [ -z $CC ]; then CC="cc" fi if [ -z $CFLAGS ]; then CFLAGS="-s -Os -Wextra -Wall -pedantic" fi chmod -v +x clean.sh ./scripts/build-box.sh ./libmu/build-libmu.sh ./clean.sh ./libmu/build-libmu.sh 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