28 lines
326 B
Bash
Executable File
28 lines
326 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. `dirname $0`/flags.sh
|
|
|
|
function build() {
|
|
mkdir -p bin
|
|
cc $CFLAGS -c -o "bin/$1.o" src/*.c && \
|
|
cc -o "bin/$1" "bin/$1.o" $APP_LIBS || \
|
|
echo "XXX FAIL!"
|
|
}
|
|
|
|
function clean() {
|
|
rm -f bin/*
|
|
}
|
|
|
|
case "$2" in
|
|
install)
|
|
clean; build "$1"
|
|
cp "bin/$1" "$PREFIX/bin"
|
|
clean
|
|
;;
|
|
clean)
|
|
clean
|
|
;;
|
|
*)
|
|
build "$1"
|
|
esac
|