forked from multitheftauto/mtasa-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
initial-install.sh
executable file
·55 lines (47 loc) · 1.56 KB
/
initial-install.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
45
46
47
48
49
50
51
52
53
54
#! /bin/sh
#
# To compile with symbols:
# ./initial-install.sh -g
#
# Remove previous build files
make clean
# generate autotools build system files
autoreconf -fiv
# then look at the configure options:
# ./configure --help
if [ $1 = "-g" ]; then
./configure --with-pic --disable-system-pcre --enable-utf8 \
CFLAGS='-g -O2 -fPIC -DPIC' \
CXXFLAGS='-g -O2 -fPIC -DPIC -std=c++0x' \
CPPFLAGS='-g -O2 -fPIC -DPIC'
else
./configure --with-pic --disable-system-pcre --enable-utf8 \
CFLAGS='-O2 -fPIC -DPIC' \
CXXFLAGS='-O2 -fPIC -DPIC -std=c++0x' \
CPPFLAGS='-O2 -fPIC -DPIC'
fi
# Remove previous build files #2
make clean
rm ./MTA10_Server/core/core.la
rm ./MTA10_Server/dbconmy/dbconmy.la
rm ./MTA10_Server/mods/deathmatch/deathmatch.la
rm ./Shared/XML/xmll.la
rm ./MTA10_Server/net/net.la
# Build breakpad
cd ./vendor/google-breakpad
./configure
make CXXFLAGS='-Wno-sign-compare'
cd ../..
# then you have makefiles and the source can be compiled :)
# building in parallel mode (use -j<JOBS>)
if [ $1 = "-g" ]; then
make \
CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' \
CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized -std=c++0x' \
CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' >_make.log
else
make \
CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' \
CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized -std=c++0x' \
CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' >_make.log
fi