input: Map mute + volume multimedia keys.
[gfxprim.git] / install.sh
blobf631083cc732adba324907324e3e7d6bdd9cb1a9
1 #!/bin/sh
3 INSTALL_PREFIX="$1"
5 if test -z "$INSTALL_PREFIX"; then
6 INSTALL_PREFIX="/usr"
7 fi
9 HEADER_LOC="$INSTALL_PREFIX/include/"
10 LIB_LOC="$INSTALL_PREFIX/lib/"
11 BIN_LOC="$INSTALL_PREFIX/bin/"
13 # Headers
14 echo "INSTALL headers"
15 install -m 775 -d "${HEADER_LOC}GP"
16 for i in `ls include/`; do
17 if [ -d "include/$i" ]; then
18 echo " $i"
19 install -m 775 -d "${HEADER_LOC}GP/$i"
20 install -m 664 "include/$i/"*.h "${HEADER_LOC}GP/$i"
21 else
22 install -m 664 "include/$i" "${HEADER_LOC}GP/$i"
24 done
26 # Library
27 echo "INSTALL libraries"
28 install -m 775 -d "$LIB_LOC"
30 for i in build/*.so build/*.so.* build/*.a; do
31 if [ -L "$i" ]; then
32 TARGET=`basename "$i"`
33 SOURCE=`readlink "$i"`
34 (cd "$LIB_LOC" && rm -f "$TARGET" && ln -s "$LIB_LOC$SOURCE" "$TARGET")
35 else
36 install "$i" "$LIB_LOC"
38 done
40 # Binaries
41 echo "INSTALL binaries"
42 install -m 755 gfxprim-config "$BIN_LOC"
43 install -m 755 demos/spiv/spiv "$BIN_LOC"