summaryrefslogtreecommitdiff
path: root/src/install.sh
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-04-05 01:01:58 +0000
committerIan C <ianc@noddybox.co.uk>2005-04-05 01:01:58 +0000
commit517295ea0928dfd2bd30d997949c472f68d22e06 (patch)
treef733543fd9fc1792185583f8b7289cf2ed1bbb16 /src/install.sh
parentd625e19cdc79ec54d882aad95d05d7f24577bb6b (diff)
Implemented install
Diffstat (limited to 'src/install.sh')
-rw-r--r--src/install.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/install.sh b/src/install.sh
new file mode 100644
index 0000000..e3274ae
--- /dev/null
+++ b/src/install.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Install script to w32dlib
+#
+# $Id$
+#
+
+if [ "$2" == "" ] ; then
+ echo usage: $0 install-dir script-flag
+ exit 1
+fi
+
+incbase=$1/include
+incdir=$incbase/w32dlib
+libdir=$1/lib
+mkinfo=$2
+conf=/usr/local/bin/w32dlib-config
+
+echo ==== Copying header files to $incdir ====
+mkdir -p $incdir
+cp --verbose --force w32dlib/*.h $incdir
+
+echo ==== Copying library files to $libdir ====
+mkdir -p $libdir
+cp --verbose --force libw32dlib.a $libdir
+
+if [ $mkinfo == "1" ] ; then
+ echo ==== Creating $conf ====
+
+ cat << EOF > $conf
+#!/bin/sh
+
+if [ "\$1" == "--libs" ] ; then
+ echo -L$libdir -mwindows -lw32dlib
+elif [ "\$1" == "--cflags" ] ; then
+ echo -I$incbase
+else
+ echo usage: \$0 [--libs\|--cflags]
+fi
+
+EOF
+
+fi
+
+exit 0