loaders: PNG: Add support for 16 bit Grayscale.
[gfxprim/pasky.git] / install.sh
blob14c98353e886121e0cdf8be51413fd0b335af4fe
1 #!/bin/sh
3 PREFIX="$1"
4 LIBDIR="$2"
5 BINDIR="$3"
6 INCLUDEDIR="$4"
8 HEADER_LOC="$PREFIX/$INCLUDEDIR"
9 LIB_LOC="$PREFIX/$LIBDIR"
10 BIN_LOC="$PREFIX/$BINDIR"
12 # Headers
13 echo "INSTALL headers ($HEADER_LOC)"
14 install -m 775 -d "${HEADER_LOC}/GP"
15 for i in `ls include/`; do
16 if [ -d "include/$i" ]; then
17 echo " $i"
18 install -m 775 -d "${HEADER_LOC}/GP/$i"
19 install -m 664 "include/$i/"*.h "${HEADER_LOC}/GP/$i"
20 else
21 install -m 664 "include/$i" "${HEADER_LOC}/GP/$i"
23 done
25 # Library
26 echo "INSTALL libraries ($LIB_LOC)"
27 install -m 775 -d "$LIB_LOC"
29 for i in build/*.so build/*.so.* build/*.a; do
30 if [ -L "$i" ]; then
31 TARGET=`basename "$i"`
32 SOURCE=`readlink "$i"`
33 (cd "$LIB_LOC" && rm -f "$TARGET" && ln -s "$SOURCE" "$TARGET")
34 else
35 install "$i" "$LIB_LOC"
37 done
39 # Binaries
40 echo "INSTALL binaries"
41 install -m 775 -d "$BIN_LOC"
42 install -m 755 gfxprim-config "$BIN_LOC"