]> Nishi Git Mirror - gwion.git/commitdiff
:wrench: Introduce gwion-config
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 9 Oct 2019 21:43:20 +0000 (23:43 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 9 Oct 2019 21:43:20 +0000 (23:43 +0200)
scripts/gwion-config [new file with mode: 0755]

diff --git a/scripts/gwion-config b/scripts/gwion-config
new file mode 100755 (executable)
index 0000000..b1f5eb8
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+usage() {
+  echo "Usage:
+  gwion-config --version   - show installed script and Guile version
+  gwion-config --help      - show usage info (this message)
+  gwion-config link        - print libraries to link with
+  gwion-config compile     - print C compiler flags to compile with"
+}
+
+version() {
+  echo "N.A."
+}
+
+link() {
+  echo "-std=c99 -fPIC -Wall -Wextra -O2"
+}
+
+compile() {
+  echo "-fPIC -I PREFIX/gwion/util -I PREFIX/gwion/ast -I PREFIX/gwion"
+}
+
+if [ $# = 0 ]
+then usage
+elif [ "$1" = "--version" ]
+then version
+elif [ "$1" = "--help" ]
+then version
+elif [ "$1" = "link" ]
+then link
+elif [ "$1" = "compile" ]
+then compile
+fi