-
Notifications
You must be signed in to change notification settings - Fork 0
/
x.compile
executable file
·31 lines (21 loc) · 1.54 KB
/
x.compile
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
rm -f *.o
ARCH="$(getconf LONG_BIT)"
POINTERSIGN="-Wno-pointer-sign"
UNUSEDRESULT="-Wno-unused-result"
UNUSEDVARIABLE="-Wno-unused-variable"
SETVARIABLE="-Wno-unused-but-set-variable"
WRITESTRINGS="-Wno-write-strings"
WNOSIGNCOMPARE="-Wno-sign-compare"
gcc -Wall -g -O3 -fomit-frame-pointer -fPIC -J4 -c helper.c -o helper.o
gcc -Wall -g -O3 -fomit-frame-pointer -fPIC -J4 -c -o log.o log.c
gcc -Wall -g -O3 -fomit-frame-pointer -fPIC -J4 -c -o hook.o hook.c
######################## INI File Parser ##########################
gcc -Wall -g -O3 -fomit-frame-pointer -fPIC -ansi -pedantic -J4 -c -o iniparser.o iniparser.c
gcc -Wall -g -O3 -fomit-frame-pointer -fPIC -ansi -pedantic -J4 -c -o dictionary.o dictionary.c
######################## INI File Parser ##########################
if [ "$ARCH" = "32" ]; then
gcc -Wall -rdynamic -g -O3 -fomit-frame-pointer $WRITESTRINGS $UNUSEDRESULT $UNUSEDVARIABLE $WNOSIGNCOMPARE -o monitad monitad.cpp hook.o helper.o log.o iniparser.o dictionary.o liboauth.a libmonita.a -I/usr/local/include -Ilibtop/include -Ilibtop/os/linux -Ioauth/ -L/usr/lib -Xlinker -zmuldefs -lpthread -lcurl -lm -lzmq -lssl -lcrypto -lstdc++
elif [ "$ARCH" = "64" ]; then
gcc -Wall -rdynamic -g -O3 -fomit-frame-pointer $WRITESTRINGS $UNUSEDRESULT $UNUSEDVARIABLE $WNOSIGNCOMPARE -o monitad monitad.cpp hook.o helper.o log.o iniparser.o dictionary.o liboauth.a libmonita.a -I/usr/local/include -Ilibtop/include -Ilibtop/os/linux -Ioauth/ -L/usr/local/lib -Xlinker -zmuldefs -lpthread -lcurl -lm -lzmq -lssl -lcrypto -lstdc++
fi
rm -f *.o