Date: Monday, November 14, 2005 @ 18:51:38
Author: marc
Path: /cvsroot/carob/carob
Added: test/GNUmakefile (1.1)
Modified: Makefile (1.11 -> 1.12)
Forked a new test/GNUmakefile from the main Makefile.
------------------+
Makefile | 24 +++---------------------
test/GNUmakefile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 21 deletions(-)
Index: carob/Makefile
diff -u carob/Makefile:1.11 carob/Makefile:1.12
--- carob/Makefile:1.11 Mon Nov 14 16:36:22 2005
+++ carob/Makefile Mon Nov 14 18:51:38 2005
@@ -35,7 +35,6 @@
#Dirs
INCDIR = include
SRCDIR = src
-TESTDIR = test
#Carob C++ lib
OBJS = ${SRCDIR}/Common.o\
@@ -60,18 +59,6 @@
LIB_CAROB_LIB_SHORT = lib${LIB_CAROB}.so
LIB_CAROB_LIB = ${LIB_CAROB_LIB_SHORT}.${LIB_MAJOR_VERSION}
-#Test
-LIB_CPPUNIT = cppunit
-TEST_OBJS = ${TESTDIR}/TestOnValidConnection.o\
- ${TESTDIR}/TestBeginCommitRollback.o\
- ${TESTDIR}/TestConnect.o\
- ${TESTDIR}/TestExecWriteRequest.o\
- ${TESTDIR}/TestExecReadRequest.o\
- ${TESTDIR}/TestStatement.o\
- ${TESTDIR}/CarobTestLauncher.o
-TEST_CFLAGS = -g3 -Wall -I${INCDIR}
-TEST_LDFLAGS = -Wl,-rpath,. -L. -l${LIB_CAROB} -ldl -l${LIB_CPPUNIT}
-TEST_EXE = carobTestLauncher
#Doc
# DOC_DIR is duplicated in Doxyfile
@@ -80,28 +67,23 @@
DOXYFILE = ${DOC_DIR}/Doxyfile
DOC_HTML = ${DOC_OUT}/index.html
-#uncomment test to compile CppUnit tests
all: lib
lib: ${LIB_CAROB_LIB}
-test: all ${TEST_EXE}
+test: all
+ cd test && make
${LIB_CAROB_LIB}: ${OBJS}
${COMPILER} ${LDFLAGS} -o ${LIB_CAROB_LIB} ${OBJS}
${RM} ${LIB_CAROB_LIB_SHORT}
${LN} ${LIB_CAROB_LIB} ${LIB_CAROB_LIB_SHORT}
-${TEST_EXE}: ${TEST_OBJS}
- ${COMPILER} ${TEST_LDFLAGS} -o ${TEST_EXE} ${TEST_OBJS}
-
-${TESTDIR}%.o: ${TESTDIR}%.cpp
- ${COMPILER} ${TEST_CFLAGS} -o $@ -c $<
%.o: %.cpp
${COMPILER} $(CFLAGS) -o $@ -c $<
clean: clean-lib clean-test clean-doc
clean-lib:
${RM} ${SRCDIR}/*.o ${LIB_CAROB_LIB} ${LIB_CAROB_LIB_SHORT}
clean-test:
- ${RM} ${TESTDIR}/*.o ${TEST_EXE}
+ cd test && make clean
clean-doc:
${RMDIR} ${DOC_OUT}
Index: carob/test/GNUmakefile
diff -u /dev/null carob/test/GNUmakefile:1.1
--- /dev/null Mon Nov 14 18:51:38 2005
+++ carob/test/GNUmakefile Mon Nov 14 18:51:38 2005
@@ -0,0 +1,52 @@
+#
+# Sequoia: Database clustering technology.
+# Copyright (C) 2005 Emic Networks
+# Contact: [EMAIL PROTECTED]
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Initial developer(s): Gilles Rayrat
+# Contributor(s): Marc Herbert
+#
+
+# Makefile for the Carob C++ API and tests
+#
+
+CAROB_SRC = ..
+
+LIB_CAROB = carobcpp
+
+INCDIR = ${CAROB_SRC}/include
+
+
+LIB_CPPUNIT = cppunit
+OBJS = TestOnValidConnection.o\
+ TestBeginCommitRollback.o\
+ TestConnect.o\
+ TestExecWriteRequest.o\
+ TestExecReadRequest.o\
+ TestStatement.o\
+ CarobTestLauncher.o
+CFLAGS = -g3 -Wall -I${INCDIR}
+LDFLAGS = -Wl,-rpath,. -L${CAROB_SRC} -l${LIB_CAROB} -ldl
-l${LIB_CPPUNIT}
+EXE = carobTestLauncher
+
+
+${EXE}: ${OBJS}
+ ${CXX} ${LDFLAGS} -o ${EXE} ${OBJS}
+
+${TESTDIR}%.o: ${TESTDIR}%.cpp
+ ${CXX} ${CFLAGS} -o $@ -c $<
+
+clean:
+ ${RM} *.o ${EXE}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits