Xmd/scripts/buildreplicant.sh
2024-01-18 02:28:43 +00:00

35 lines
390 B
Bash
Executable File

#!/bin/sh
. `dirname $0`/flags.sh
build() {
if
mkdir -p lib && \
cc src/*.c -o "lib/$1.so" -shared $CFLAGS
then
echo ".// ok"
return 0
else
echo "XXX FAIL!"
return 1
fi
}
clean() {
rm -f bin/*
}
case "$2" in
install)
clean; build "$1"
mkdir -p "$PREFIX/lib/Xmd/replicants"
cp "lib/$1.so" "$PREFIX/lib/Xmd/replicants"
clean
;;
clean)
clean
;;
*)
build "$1"
esac