#!/bin/bash if [ "$1" == "clean" ]; then echo 'Cleaning up..'; for i in Common.c Common.h *.xrs.* *.xrc.* *.stubs.* \ Cluster.c Cluster.h User.c User.h Node.c Node.h Session.c Session.h \ Zentific.c Zentific.h system.c system.h \ zentific-xmlrpc VM.c VM.h ; do if [ -e ${i} ]; then rm ${i} ; fi done cd db_sources make clean cd .. echo 'done'; exit fi /bin/echo -e "\n\nBuilding xmlrpc server proper..\n\n" ##xdl-compiler -m server-impl -i zentific-server.xdl -o . xdl-compiler -i zentific-server.xdl -o . CFLAGS= ## May be required for gentoo-hardened #CFLAGS="-fno-pie -fno-stack-protector-all -fno-stack-protector" gcc ${CFLAGS} -ggdb -o zentific-xmlrpc *.c \ util/linked_list.c util/utility.c \ util/strings.c util/sha1.c util/sha1wrap.c \ util/xen-detect.c util/xs/*.c \ `pkg-config --cflags --libs libxr` \ -lssl -lcrypto \ -lmysqlclient -L/usr/lib/mysql -lmysys -lmystrings \ -lpam -lpam_misc \ -ldl -ldbug #gcc -Wall -ggdb -o hw *.c `pkg-config --cflags --libs libxr` -lssl -lcrypto #gcc -ggdb -o hw *.c util/linked_list.c util/database.c `pkg-config --cflags --libs libxr` -lssl -lcrypto -L/usr/lib/mysql -lmysqlclient -lpam -lpam_misc #in order by lines: # all .c files # all helper util functions (3 lines) # libxr # ssl, etc # mysql # dynamic library loading /bin/echo -e "\n\nBuilding db modules..\n\n" cd db_sources && make clean && make && cd ..