From: Christian Heller Date: Sun, 8 Mar 2015 15:57:25 +0000 (+0100) Subject: Server/py: Integrate libplomrogue building into current main building. X-Git-Tag: tce~369 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/error?a=commitdiff_plain;h=109dc4e8a5d9f09541ef2dcb84bd6b6ac2e2fb00;p=plomrogue Server/py: Integrate libplomrogue building into current main building. --- diff --git a/compile-server.sh b/compile-server.sh new file mode 100755 index 0000000..88b11b4 --- /dev/null +++ b/compile-server.sh @@ -0,0 +1,2 @@ +#!/bin/sh +gcc -shared -fPIC -std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security -g -o libplomrogue.so libplomrogue.c diff --git a/compile.sh b/compile.sh deleted file mode 100755 index 88b11b4..0000000 --- a/compile.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -gcc -shared -fPIC -std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security -g -o libplomrogue.so libplomrogue.c diff --git a/plomrogue-server.py b/plomrogue-server.py index 5af05f7..56c0044 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -26,7 +26,8 @@ def prep_library(): """Prepare ctypes library at ./libplomrogue.so""" libpath = ("./libplomrogue.so") if not os.access(libpath, os.F_OK): - raise SystemExit("No library " + libpath + ", run ./compile.sh first?") + raise SystemExit("No library " + libpath + + ", run ./compile-server.sh first?") libpr = ctypes.cdll.LoadLibrary(libpath) libpr.seed_rrand.argtypes = [ctypes.c_uint8, ctypes.c_uint32] libpr.seed_rrand.restype = ctypes.c_uint32 diff --git a/redo b/redo index 4081117..da2637b 100755 --- a/redo +++ b/redo @@ -18,5 +18,12 @@ # for a # workaround. +if [ ! -e ./libplomrogue.so ] +then + echo "non-redo stuff (preparing for future Python port sans redo needs):" + echo "Building library for server's Python variant with mere shell one-liner." + ./compile-server.sh +fi + export PATH=$PATH:$PWD/build/redo_scripts redo "$@"