Merge branch 'master' into mob
[fmail.git] / compile.sh
blob670b18eeef33630be4fcb33db0648978efb6c5dd
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/socket.cpp -I./include ${CFLAGS} -c -o bin/socket.o
13 g++ bin/baseserver.o bin/socket.o -lstdc++ -shared -o bin/libfmail.so
15 echo "Compiling Protocols"
16 g++ backends/protocol/pop3.cpp -lstdc++ `odkutils-config --libs --cflags` -I./include -L./ -lfmail -shared ${CFLAGS} -o bin/libfmail-pop3.so
17 g++ backends/protocol/smtp.cpp -lstdc++ -I./include -L./ -lfmail -shared ${CFLAGS} -o bin/libfmail-smtp.so
18 g++ backends/auth/dbauth.cpp -lstdc++ -I./include -L./ -lfmail -shared `odkutils-config --libs --cflags` `odkda-config --libs --cflags` ${CFLAGS} -o bin/libfmail-dbauth.so
20 echo "Compiling FancyMail Server"
21 g++ src/fmail.cpp -I./include -L./bin -lfmail -lstdc++ `odkutils-config --libs --cflags` ${CFLAGS} -o bin/fmail