Date: Monday, January 22, 2007 @ 15:51:24
  Author: marc
    Path: /cvsroot/carob/carob

   Added: make-includes/defaults.mk (1.1)
Modified: GNUmakefile (1.22 -> 1.23) make-includes/gnu-linker.mk (1.4 ->
          1.5) test/GNUmakefile (1.40 -> 1.41)

Moved *_CAROB_* definitions duplicated between GNUmakefile and
test/GNUmakefile to new make-includes/defaults.mk


-----------------------------+
 GNUmakefile                 |   13 ++++++-------
 make-includes/defaults.mk   |   15 +++++++++++++++
 make-includes/gnu-linker.mk |    2 +-
 test/GNUmakefile            |   22 +++++++++++-----------
 4 files changed, 33 insertions(+), 19 deletions(-)


Index: carob/GNUmakefile
diff -u carob/GNUmakefile:1.22 carob/GNUmakefile:1.23
--- carob/GNUmakefile:1.22      Mon Jan 22 12:09:35 2007
+++ carob/GNUmakefile   Mon Jan 22 15:51:24 2007
@@ -23,8 +23,6 @@
 #
 
 
-#General
-LIB_MAJOR_VERSION       = 1
 
 #Tools
 
@@ -32,7 +30,6 @@
 RMDIR                   = /bin/rm -rf
 LN                      = /bin/ln -s
 DOXYGEN                 = /usr/bin/doxygen
-LDD                     = ldd
 
 ARFLAGS                 = rcs
 
@@ -40,6 +37,12 @@
 #### PORTABILITY - CUSTOMIZATIOM
 
 MKINCLUDES=make-includes
+
+# gives default names like: carob, libcarob, libcarob.so.1,
+# libcarob.1.dylib etc.
+include ${MKINCLUDES}/defaults.mk
+
+# customization
 include ${MKINCLUDES}/main.mk
 
 
@@ -81,10 +84,6 @@
 # Or using the command line: make CXXFLAGS=-DCAROB_USE_SELECT
 # override CXXFLAGS       += -DCAROB_USE_SELECT
 
-LIB_CAROB               = carob
-LIB_CAROB_LIB_SHORT     = lib${LIB_CAROB}.so
-LIB_CAROB_LIB           = ${LIB_CAROB_LIB_SHORT}.${LIB_MAJOR_VERSION}
-LIB_CAROB_STATIC        = lib${LIB_CAROB}.a
 
 # LDLIBS is not used to build static libcarob.a
 override LDLIBS         +=  -lgmp
Index: carob/make-includes/defaults.mk
diff -u /dev/null carob/make-includes/defaults.mk:1.1
--- /dev/null   Mon Jan 22 15:51:24 2007
+++ carob/make-includes/defaults.mk     Mon Jan 22 15:51:24 2007
@@ -0,0 +1,15 @@
+
+LDD                     = ldd
+
+
+# Put an absolute path in here to be able to run from any directory or
+# to build a release
+CAROB_ROOT              = ..
+
+
+LIB_MAJOR_VERSION       = 1
+LIB_CAROB               = carob
+LIB_CAROB_LIB_SHORT     = lib${LIB_CAROB}.so
+LIB_CAROB_LIB           = ${LIB_CAROB_LIB_SHORT}.${LIB_MAJOR_VERSION}
+LIB_CAROB_STATIC        = lib${LIB_CAROB}.a
+
Index: carob/make-includes/gnu-linker.mk
diff -u carob/make-includes/gnu-linker.mk:1.4 
carob/make-includes/gnu-linker.mk:1.5
--- carob/make-includes/gnu-linker.mk:1.4       Mon Jan  8 20:24:10 2007
+++ carob/make-includes/gnu-linker.mk   Mon Jan 22 15:51:24 2007
@@ -6,4 +6,4 @@
 SHARED_INDIRECT_LDFLAGS += -soname ${LIB_CAROB_LIB}
 
 # export-dynamic is useful for debugging (as a side-effect)
-TEST_INDIRECT_LDFLAGS += -rpath ${RUNPATH} -export-dynamic
+TEST_INDIRECT_LDFLAGS += -rpath .:${CAROB_ROOT} -export-dynamic
Index: carob/test/GNUmakefile
diff -u carob/test/GNUmakefile:1.40 carob/test/GNUmakefile:1.41
--- carob/test/GNUmakefile:1.40 Mon Jan 22 12:09:35 2007
+++ carob/test/GNUmakefile      Mon Jan 22 15:51:24 2007
@@ -22,21 +22,21 @@
 # Makefile for the Carob C++ API and tests
 #
 
-LDD                     = ldd
-
 
 MKINCLUDES=../make-includes
 
+
+# gives default names like: carob, libcarob, libcarob.so.1,
+# libcarob.1.dylib etc.
+include ${MKINCLUDES}/defaults.mk
+
+LIB_CAROB_SO            = ${CAROB_ROOT}/${LIB_CAROB_LIB}
+LIB_CAROB_A             = ${CAROB_ROOT}/${LIB_CAROB_STATIC}
+
+# customization
 include ${MKINCLUDES}/main.mk
 
 
-# Put an absolute path in here to be able to run from any directory
-CAROB_ROOT              = ..
-RUNPATH                 = .:${CAROB_ROOT}
-
-LIB_CAROB               = carob
-LIB_CAROB_SO            = ${CAROB_ROOT}/lib${LIB_CAROB}.so.1
-LIB_CAROB_A             = ${CAROB_ROOT}/lib${LIB_CAROB}.a
 
 INCDIR                  = ${CAROB_ROOT}/include
 
@@ -74,7 +74,7 @@
 static: ${TESTOBJS} CarobTestLauncher.o ${LIB_CAROB_A}
        ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} -lgmp -lcppunit ${LDLIBS} 
${CLIENT_LDLIBS} -o $@
 
-clean:
+clean: clean-check
        ${RM} ${TESTOBJS} CarobTestLauncher.o ${EXE}
 
 testslist:
@@ -97,7 +97,7 @@
 # Useful to detect unresolved symbols in our lib
 checklib:  ${LIB_CAROB_SO}
        - ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${LDFLAGS} 
${TEST_LDFLAGS} ${CLIENT_LDLIBS} -o $@
-       ${LDD} ./$< ./$@
+       ${LDD} $< ./$@
        ./$@
 
 checkstatic: ${LIB_CAROB_A}

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

Reply via email to