view Makefile @ 234:0ebbf9723930 refactoring

OAOO for the trackPointQuery and trackSequenceQueryNN Reporter classes. C++ has this marvellous thing called templates, which allows for almost 1% of the power of writing source code at compile-time; in this particular case, that 1% is enough, as it allows us to generalize over the predicate for ordering in queues with a template class. Move reporters into reporter.h. The template class needs to be in there anyway; the pointQueryReporter will soon gain a template class analogue for Ollie's use case; and then there's just the Radius reporter.
author mas01cr
date Wed, 12 Dec 2007 10:58:24 +0000
parents c7d1c11c9118
children
line wrap: on
line source
HELP2MAN=help2man
GENGETOPT=gengetopt
SOAPCPP2=soapcpp2
GSOAP_CPP=-lgsoap++
GSOAP_INCLUDE=

override CFLAGS+=-O3 -g
ifeq ($(shell uname),Linux)
override CFLAGS+=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
endif

EXECUTABLE=audioDB

.PHONY: all clean test

all: ${EXECUTABLE}

${EXECUTABLE}.1: ${EXECUTABLE}
	${HELP2MAN} ./${EXECUTABLE} > ${EXECUTABLE}.1

HELP.txt: ${EXECUTABLE}
	./${EXECUTABLE} --help > HELP.txt

cmdline.c cmdline.h: gengetopt.in
	${GENGETOPT} -e <gengetopt.in

soapServer.cpp soapClient.cpp soapC.cpp adb.nsmap: audioDBws.h
	${SOAPCPP2} audioDBws.h

%.o: %.cpp audioDB.h adb.nsmap cmdline.h reporter.h
	g++ -c ${CFLAGS} ${GSOAP_INCLUDE} -Wall -Werror $<

OBJS=insert.o create.o common.o dump.o query.o soap.o audioDB.o

${EXECUTABLE}: ${OBJS} soapServer.cpp soapClient.cpp soapC.cpp cmdline.c
	g++ -o ${EXECUTABLE} ${CFLAGS} ${GSOAP_INCLUDE} $^ ${GSOAP_CPP}

clean:
	-rm cmdline.c cmdline.h
	-rm soapServer.cpp soapClient.cpp soapC.cpp soapObject.h soapStub.h soapProxy.h soapH.h soapServerLib.cpp soapClientLib.cpp
	-rm adb.nsmap adb.xsd adb.wsdl adb.*.req.xml adb.*.res.xml
	-rm HELP.txt
	-rm ${EXECUTABLE} ${EXECUTABLE}.1 ${OBJS}
	-sh -c "cd tests && sh ./clean.sh"

test: ${EXECUTABLE}
	-sh -c "cd tests && sh ./run-tests.sh"