Refactored Socket Class
[fmail.git] / compile.sh
blobd1d4105c8a64c6084b0d6a6968ced390d4fa4f6e
1 #!/bin/bash
3 rm -fr bin
5 mkdir -p bin
7 CFLAGS="-g"
9 echo "Compiling libfmail"
10 g++ src/baseserver.cpp -I./include ${CFLAGS} -c -o bin/baseserver.o
11 g++ src/posixsocket.cpp -I./include ${CFLAGS} -c -o bin/socket.o
13 g++ src/ipcmsg.cpp -I./include ${CFLAGS} -c -o bin/ipcmsg.o
14 g++ src/socketipc.cpp -I./include ${CFLAGS} -c -o bin/socketipc.o
15 g++ src/ipc.cpp -I./include ${CFLAGS} -c -o bin/ipc.o
17 g++ bin/baseserver.o bin/socket.o bin/socketipc.o bin/ipc.o bin/ipcmsg.o -lpcrecpp -lstdc++ -shared -o bin/libfmail.so
19 #echo "Compiling Testcases"
20 #g++ testcase/ipctest.cpp -lfmail -g -I./include -L./bin -o bin/ipctest
21 #g++ testcase/ipccommand.cpp -lfmail -g -I./include -L./bin -o bin/ipccommand
23 echo "Compiling Servers"
24 g++ backends/auth/fsauth.cpp -lstdc++ -I./include -L./bin -lfmail `odkutils-config --libs` ${CFLAGS} -o bin/fmail-fsauth
25 g++ backends/mailbox/fsmailbox.cpp -lstdc++ -I./include -L./bin -lfmail `odkutils-config --libs` ${CFLAGS} -o bin/fmail-fsmailbox
27 g++ backends/protocol/pop3.cpp -I./include -L./bin -lfmail -lstdc++ -lpcrecpp ${CFLAGS} -o bin/fmail-pop3
28 g++ backends/protocol/smtp.cpp -I./include -L./bin -lfmail -lstdc++ -lpcrecpp ${CFLAGS} -o bin/fmail-smtp