First replicant yay

This commit is contained in:
Sasha Koshka
2023-11-13 19:05:51 -05:00
parent 55dfca6341
commit a6fa746ef3
18 changed files with 299 additions and 78 deletions

34
scripts/buildreplicant.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
. `dirname $0`/flags.sh
function 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
}
function 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

View File

@@ -2,4 +2,4 @@
CFLAGS="-std=c99 -Wall -Wextra -Werror -fPIC"
PREFIX="/usr/local"
APP_LIBS="-lXmd -lXm -lXt -lX11"
APP_LIBS="-lXmd -lXm -lXt -lX11 -ldl"