annotate Makefile @ 279:dee55886eca0 sampling

make the RNG a part of the audioDB object. Easier to deal with memory discipline and initialization (though note the FIXME comment in audioDB::initTables()). Also initialize the RNG from the current time. A mature implementation would use a proper source of entropy...
author mas01cr
date Wed, 02 Jul 2008 13:53:23 +0000
parents 5d721f1ead01
children
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@138 5 GSOAP_INCLUDE=
mas01cr@137 6
mas01cr@239 7 override CFLAGS+=-O3 -g
mas01cr@244 8
mas01cr@239 9 ifeq ($(shell uname),Linux)
mas01cr@239 10 override CFLAGS+=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
mas01cr@239 11 endif
mas01cr@137 12
mas01cr@244 13 ifeq ($(shell uname),Darwin)
mas01cr@244 14 ifeq ($(shell sysctl -n hw.optional.x86_64),1)
mas01cr@244 15 override CFLAGS+=-arch x86_64
mas01cr@244 16 endif
mas01cr@244 17 endif
mas01cr@244 18
mas01cr@2 19 EXECUTABLE=audioDB
mas01cr@2 20
mas01cr@72 21 .PHONY: all clean test
mas01cr@72 22
mas01cr@2 23 all: ${EXECUTABLE}
mas01cr@2 24
mas01cr@2 25 ${EXECUTABLE}.1: ${EXECUTABLE}
mas01cr@137 26 ${HELP2MAN} ./${EXECUTABLE} > ${EXECUTABLE}.1
mas01cr@0 27
mas01cr@134 28 HELP.txt: ${EXECUTABLE}
mas01cr@134 29 ./${EXECUTABLE} --help > HELP.txt
mas01cr@3 30
mas01cr@1 31 cmdline.c cmdline.h: gengetopt.in
mas01cr@165 32 ${GENGETOPT} -e <gengetopt.in
mas01cr@1 33
mas01cr@239 34 soapServer.cpp soapClient.cpp soapC.cpp adb.nsmap: audioDBws.h
mas01cr@137 35 ${SOAPCPP2} audioDBws.h
mas01cr@1 36
mas01cr@239 37 %.o: %.cpp audioDB.h adb.nsmap cmdline.h reporter.h
mas01cr@239 38 g++ -c ${CFLAGS} ${GSOAP_INCLUDE} -Wall -Werror $<
mas01cr@239 39
mas01cr@266 40 OBJS=insert.o create.o common.o dump.o query.o soap.o sample.o audioDB.o
mas01cr@239 41
mas01cr@239 42 ${EXECUTABLE}: ${OBJS} soapServer.cpp soapClient.cpp soapC.cpp cmdline.c
mas01cr@268 43 g++ -o ${EXECUTABLE} ${CFLAGS} -lgsl -lgslcblas ${GSOAP_INCLUDE} $^ ${GSOAP_CPP}
mas01cr@2 44
mas01cr@2 45 clean:
mas01cr@2 46 -rm cmdline.c cmdline.h
mas01cr@2 47 -rm soapServer.cpp soapClient.cpp soapC.cpp soapObject.h soapStub.h soapProxy.h soapH.h soapServerLib.cpp soapClientLib.cpp
mas01cr@239 48 -rm adb.nsmap adb.xsd adb.wsdl adb.*.req.xml adb.*.res.xml
mas01cr@135 49 -rm HELP.txt
mas01cr@239 50 -rm ${EXECUTABLE} ${EXECUTABLE}.1 ${OBJS}
mas01cr@59 51 -sh -c "cd tests && sh ./clean.sh"
mas01cr@72 52
mas01cr@73 53 test: ${EXECUTABLE}
mas01cr@72 54 -sh -c "cd tests && sh ./run-tests.sh"
mas01cr@272 55
mas01cr@272 56 xthresh: xthresh.c
mas01cr@272 57 gcc -o $@ -lgsl -lgslcblas $<