annotate MakefileLSH @ 373:cd63493c32a9

Add library SONAME versioning. This has the unfortunate effect of altering how the linker and the runtime library resolver find relevant files, which has effects on how the library test suite should be run. So... ... also rework how to run libtests. Start by deleting 28 almost-identical copies of Makefile and run-test.sh, and also the completely useless copy of test-utils.sh. Then: * library tests assume the existence of ../libtest.mk, a file with make syntax; * ../libtest.mk is responsible for providing enough symbolic links to con the linker and the runtime resolver into finding our library; * the default way of doing that is by using the -rpath linker flag. * run-tests.sh converts from test1 success convention ("return 0") to tests success convention ("exit 104") * clean.sh cleans up our symbolic links. This test regime stands a reasonable chance of running on OS X eventually, and a snowball's chance in heaven (remember, heaven is hotter than hell) on Windows. It should still be straightforward to merge libtests/ into tests/ when that is appropriate. Don't forget to add ../libtest.mk
author mas01cr
date Thu, 13 Nov 2008 17:09:51 +0000
parents 071a108580a4
children
rev   line source
mas01mc@294 1 #CFLAGS= -O3 -g
mas01mc@294 2 CFLAGS= -ggdb --save-temps
mas01mc@292 3 MTSOURCES=mt19937/mt19937ar.c
mas01mc@292 4 CFLAGS+=-DMT19937
mas01mc@292 5 GENGETOPT=gengetopt
mas01mc@292 6 SOAPCPP2=soapcpp2
mas01mc@292 7 GSOAP_CPP=-lgsoap++
mas01mc@292 8 GSOAP_INCLUDE=
mas01mc@292 9
mas01mc@294 10 TARGET=UNIT_TEST_LSH
mas01mc@294 11 LSHOBS=UNIT_TEST_LSH.cpp lshlib.cpp
mas01mc@294 12 LSHHDRS=lshlib.h
mas01mc@292 13
mas01mc@292 14 ifeq ($(shell uname),Linux)
mas01mc@292 15 override CFLAGS+=-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
mas01mc@292 16 endif
mas01mc@292 17
mas01mc@292 18 all: ${TARGET}
mas01mc@292 19
mas01mc@292 20 ${TARGET}: ${LSHOBS} ${LSHHDRS} ${MTSOURCES} MakefileLSH
mas01mc@292 21 ${GENGETOPT} -e <gengetopt.in
mas01mc@292 22 ${SOAPCPP2} audioDBws.h
mas01mc@292 23 g++ -o ${TARGET} ${CFLAGS} ${LSHOBS} ${MTSOURCES}
mas01mc@292 24