Date: Monday, January 8, 2007 @ 17:00:05
  Author: marc
    Path: /cvsroot/carob/carob

Modified: make-includes/linux-os.mk (1.1 -> 1.2) test/GNUmakefile (1.30 ->
          1.31)

test/GNUmakefile rework:
- no more using LDLIBS but TEST_LDLIBS
- -ldl on linux is no more in LDLIBS but just in TEST_LDLIBS
- linking to ../libcarob.so.1 only once (no more -lcarob)
- added -lpthread for CAROB-117
- removed CXXFLAGS (re-)definition duplicated from main GNUmakefile


---------------------------+
 make-includes/linux-os.mk |    2 +-
 test/GNUmakefile          |   22 ++++++++++------------
 2 files changed, 11 insertions(+), 13 deletions(-)


Index: carob/make-includes/linux-os.mk
diff -u carob/make-includes/linux-os.mk:1.1 carob/make-includes/linux-os.mk:1.2
--- carob/make-includes/linux-os.mk:1.1 Mon Jan  8 15:14:09 2007
+++ carob/make-includes/linux-os.mk     Mon Jan  8 17:00:05 2007
@@ -1,2 +1,2 @@
 
-MK_LDLIBS += -ldl
+# empty file
Index: carob/test/GNUmakefile
diff -u carob/test/GNUmakefile:1.30 carob/test/GNUmakefile:1.31
--- carob/test/GNUmakefile:1.30 Thu Jan  4 20:41:34 2007
+++ carob/test/GNUmakefile      Mon Jan  8 17:00:05 2007
@@ -47,21 +47,18 @@
 
 TESTOBJS = ${TESTSRCS:%.cpp=%.o}
 
-# optional CXXFLAGS
-CXXFLAGS                = -g3 -Wall
-# mandatory CXXFLAGS (gcc)
+# mandatory CPPFLAGS
 override CPPFLAGS       += -I${INCDIR}
 
 
-# optional LDFLAGS
+# even when tests don't use thread, -lpthread must be first, check CAROB-117
+override TEST_LDLIBS     += -lpthread -l${LIB_CPPUNIT}
+
 # cppunit is sometimes not linked to libdl while using dlopen() & co
-LDLIBS                  = -ldl
+ifeq (${OS}, linux)
+override TEST_LDLIBS += -ldl
+endif
 
-## mandatory LDFLAGS
-# for libcarob
-override LDFLAGS        += -L${CAROB_ROOT} -l${LIB_CAROB}
-# for libcppunit
-override LDLIBS        += -l${LIB_CPPUNIT}
 
 # For QT ui, uncomment this
 #LDFLAGS                 += -l${LIB_CPPUNIT_QTUI}
@@ -70,14 +67,15 @@
 
 # Uncomment these 2 lines to use log4cxx instead of internal logger
 #CXXFLAGS                += -DCAROB_USE_LOG4CXX
-#LDLIBS                  += -llog4cxx
+#TEST_LDLIBS                  += -llog4cxx
 
 # to run against a mysql cluster (changes user/pass and requests)
 # see 20-Write/TestExecWriteRequest.cpp
 #CXXFLAGS                += -DCAROB_TEST_USE_MYSQL
 
+# Do not use LDLIBS here since it is already used for libcarob.so
 ${EXE}: ${TESTOBJS} CarobTestLauncher.o ${LIB_CAROB_SO}
-       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} ${TEST_LDFLAGS} ${LDLIBS} -o $@
+       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} ${TEST_LDFLAGS} ${TEST_LDLIBS} -o $@
 
 ${LIB_CAROB_FILE}:
        ${MAKE} -C ${CAROB_ROOT}

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to