HDRS=net.h timer.h http.h web.h sql.h server.h aisle-rpc.h asta-rpc.h background.h daemon.h aside-rpc.h escape.h OBJS=net.o timer.o http.o web.o sql.o server.o aisle-rpc.o asta-rpc.o background.o daemon.o aside-rpc.o escape.o CC=gcc CFLAGS=-g -O -shared -fPIC -pthread #CFLAGS=-g -pg -O -shared -fPIC -pthread all: liba.so tests clean: rm -f liba.h liba.so test ${OBJS} install: liba.so liba.h liba.a rm -f /usr/local/lib/liba.so cp liba.so /usr/local/lib/ cp liba.a /usr/local/lib/ cp liba.h /usr/local/include/ tests: ${OBJS} liba.h gcc -g -isystem . test.c ${OBJS} -lpq -lpthread -o test shared-tests: gcc -g test.c -la -o test liba.so: ${OBJS} liba.h Makefile ld -shared ${OBJS} -o liba.so -lpq -lpthread liba.a: ${OBJS} liba.h Makefile rm -f liba.a ar cq liba.a ${OBJS} ranlib liba.a liba.h: ${HDRS} Makefile echo "/* Answer Code Toolbox Contents:" > liba.h echo " * " ${HDRS} >> liba.h echo -n " * " >> liba.h ; date >> liba.h ; echo -e " */" >> liba.h ; bash -c 'for h in ${HDRS}; do echo -en "\n/* " $$h " */\n" >> liba.h ; cat $$h >> liba.h ; done'