-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_generic_linux.sh
executable file
·48 lines (35 loc) · 1.21 KB
/
build_generic_linux.sh
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
#!/bin/bash
#change to the directory this script is in... (defensive)
cd `dirname "$0"`
#checkout the dependencies needed to build...
rm -Rf deps_dcwapd
mkdir deps_dcwapd
cd deps_dcwapd
DEPDIR="`pwd`"
git clone ssh://[email protected]:7999/dcw/libdcwproto.git
git clone ssh://[email protected]:7999/dcw/libdcwsocket.git
git clone ssh://[email protected]:7999/dcw/macremapper.git
cd -
DEPDIRDEST="$DEPDIR"/install
#build libdcwproto...
cd "$DEPDIR/libdcwproto" && ./configure && make && make install DESTDIR="$DEPDIRDEST"
#build libdcwsocket...
cd "$DEPDIR/libdcwsocket" && ./configure && make && make install DESTDIR="$DEPDIRDEST"
#build macremapper userland stuff...
cd "$DEPDIR/macremapper/userland" && ./configure && make && make install DESTDIR="$DEPDIRDEST"
#configure ourself...
autoreconf --install
export CXXFLAGS="-I$DEPDIRDEST/usr/local/include"
export LIBS="$DEPDIRDEST/usr/local/lib/libdcwproto.a $DEPDIRDEST/usr/local/lib/libdcwsocket.a $DEPDIRDEST/usr/local/lib/libmrmfilterparser.a"
./configure --enable-platform=linuxjsonstatic
make -j
make install DESTDIR="$DEPDIRDEST"
#thats it...
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "The output is here: $DEPDIRDEST/usr/local/bin/dcwapd"