changeset 257:fc6ee42c7e55

added a working osx makefile. user must change libsoap reference to reflect thei system.
author map01bf
date Mon, 21 Apr 2008 15:36:50 +0000
parents 4dcb09f5fe85
children c54e90413b86
files Makefile.osx-x86_64
diffstat 1 files changed, 49 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.osx-x86_64	Mon Apr 21 15:36:50 2008 +0000
@@ -0,0 +1,49 @@
+HELP2MAN=help2man
+GENGETOPT=gengetopt
+SOAPCPP2=soapcpp2
+GSOAP_CPP=/Users/map01bf/src/gsoap-macosx-2.7/stdsoap2.cpp
+GSOAP_INCLUDE=-I /Users/map01bf/src/gsoap-macosx-2.7/
+CFLAGS=-Wall -arch x86_64
+
+
+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"