annotate Makefile @ 333:cc3f9d1ca2cd

Ugly hack upon ugly hack: * extend adb__query() to take a bunch of other arguments that allow useful functionality through to the SOAP server; * alter the RadiusQuery reporter so that the count for tracks is returned through SOAP, punning one of the result fields for the purpose; * alter argv construction to be more dynamic, to reflect that the very presence of some arguments changes audioDB behaviour. Now test 0020 passes, only some 12 months after it was originally written, yay. Alter test 0050 also, so that the results are actually vaguely what would be expected from a radius search; they are not completely checked for correctness, but are (apart from the last two) the same as test 0040. I believe that the modifications are backward compatible; lightly testing with an old audioDB binary suggests that old-format SOAP queries continue to work. Currently too baby-encumbered to think of how to test this fully.
author mas01cr
date Mon, 01 Sep 2008 15:35:05 +0000
parents d2c56d4f841e
children a6edbe97fddf
rev   line source
mas01cr@137 1 HELP2MAN=help2man
mas01cr@137 2 GENGETOPT=gengetopt
mas01cr@137 3 SOAPCPP2=soapcpp2
mas01cr@138 4 GSOAP_CPP=-lgsoap++
mas01cr@281 5 LIBGSL=-lgsl -lgslcblas
map01bf@282 6 GSL_INCLUDE=
mas01cr@138 7 GSOAP_INCLUDE=
mas01cr@137 8
mas01cr@239 9 override CFLAGS+=-O3 -g
mas01cr@244 10
mas01cr@239 11 ifeq ($(shell uname),Linux)
mas01cr@239 12 override CFLAGS+=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
mas01cr@239 13 endif
mas01cr@137 14
mas01cr@244 15 ifeq ($(shell uname),Darwin)
mas01cr@244 16 ifeq ($(shell sysctl -n hw.optional.x86_64),1)
mas01mc@315 17 override CFLAGS+=-arch x86_64
mas01cr@244 18 endif
mas01cr@244 19 endif
mas01cr@244 20
mas01cr@2 21 EXECUTABLE=audioDB
mas01cr@2 22
mas01cr@72 23 .PHONY: all clean test
mas01cr@72 24
mas01cr@2 25 all: ${EXECUTABLE}
mas01cr@2 26
mas01cr@2 27 ${EXECUTABLE}.1: ${EXECUTABLE}
mas01cr@137 28 ${HELP2MAN} ./${EXECUTABLE} > ${EXECUTABLE}.1
mas01cr@0 29
mas01cr@134 30 HELP.txt: ${EXECUTABLE}
mas01cr@134 31 ./${EXECUTABLE} --help > HELP.txt
mas01cr@3 32
mas01cr@1 33 cmdline.c cmdline.h: gengetopt.in
mas01cr@165 34 ${GENGETOPT} -e <gengetopt.in
mas01cr@1 35
mas01cr@239 36 soapServer.cpp soapClient.cpp soapC.cpp adb.nsmap: audioDBws.h
mas01cr@137 37 ${SOAPCPP2} audioDBws.h
mas01cr@1 38
mas01mc@292 39 %.o: %.cpp audioDB.h adb.nsmap cmdline.h reporter.h ReporterBase.h lshlib.h
map01bf@282 40 g++ -c ${CFLAGS} ${GSOAP_INCLUDE} ${GSL_INCLUDE} -Wall $<
mas01cr@239 41
mas01mc@292 42 OBJS=insert.o create.o common.o dump.o query.o soap.o sample.o audioDB.o index.o lshlib.o
mas01cr@239 43
mas01cr@239 44 ${EXECUTABLE}: ${OBJS} soapServer.cpp soapClient.cpp soapC.cpp cmdline.c
map01bf@282 45 g++ -o ${EXECUTABLE} ${CFLAGS} ${GSL_INCLUDE} ${LIBGSL} ${GSOAP_INCLUDE} $^ ${GSOAP_CPP}
mas01cr@2 46
mas01cr@2 47 clean:
mas01cr@2 48 -rm cmdline.c cmdline.h
mas01cr@2 49 -rm soapServer.cpp soapClient.cpp soapC.cpp soapObject.h soapStub.h soapProxy.h soapH.h soapServerLib.cpp soapClientLib.cpp
mas01cr@239 50 -rm adb.nsmap adb.xsd adb.wsdl adb.*.req.xml adb.*.res.xml
mas01cr@135 51 -rm HELP.txt
mas01cr@239 52 -rm ${EXECUTABLE} ${EXECUTABLE}.1 ${OBJS}
mas01cr@281 53 -rm xthresh
mas01cr@59 54 -sh -c "cd tests && sh ./clean.sh"
mas01cr@72 55
mas01cr@73 56 test: ${EXECUTABLE}
mas01cr@72 57 -sh -c "cd tests && sh ./run-tests.sh"
mas01cr@280 58
mas01cr@280 59 xthresh: xthresh.c
map01bf@282 60 gcc -o $@ ${CFLAGS} ${GSL_INCLUDE} ${LIBGSL} $<