summaryrefslogtreecommitdiffstats
path: root/contrib/build-scripts/build-arabica-linux.sh
blob: be20faf24d195b87b9fb5db0e66eee653522982f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash

#
# build arabica for Linux
#

# exit on error
set -e

ME=`basename $0`
DIR="$( cd "$( dirname "$0" )" && pwd )" 
CPUARCH=`uname -m`
DEST_DIR="${DIR}/../prebuilt/linux-${CPUARCH}/gnu"

if [ ! -f src/arabica.cpp ]; then
	echo
	echo "Cannot find src/arabica.cpp"
	echo "Run script from within arabica directory:"
	echo "arabica $ ../../${ME}"
	echo
	exit
fi

if [ -f Makefile ]; then
  make clean
fi

./configure \
CFLAGS="-g" \
CXXFLAGS="-g" \
LDFLAGS="-g" \
--with-parser=libxml2 \
--with-tests=no \
--disable-shared \
--disable-dependency-tracking \
--with-pic \
--prefix=${DEST_DIR}

make
cp ./src/.libs/libarabica.a ./libarabica_d.a
make install # once for headers
rm ${DEST_DIR}/lib/libarabica*
make clean

./configure \
--with-parser=libxml2 \
--with-tests=no \
--disable-shared \
--disable-dependency-tracking \
--with-pic

make
cp ./src/.libs/libarabica.a ./libarabica.a
make clean

cp ./libarabica.a ${DEST_DIR}/lib
cp ./libarabica_d.a ${DEST_DIR}/lib