Date: Wednesday, April 5, 2006 @ 11:08:50
  Author: marc
    Path: /cvsroot/carob/odbsequoia/src

Modified: GNUmakefile (1.8 -> 1.9)

Implemented CAROB-91 (ability to override default CXXFLAGS and LDFLAGS on the 
command line)


-------------+
 GNUmakefile |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)


Index: odbsequoia/src/GNUmakefile
diff -u odbsequoia/src/GNUmakefile:1.8 odbsequoia/src/GNUmakefile:1.9
--- odbsequoia/src/GNUmakefile:1.8      Wed Mar 22 21:57:28 2006
+++ odbsequoia/src/GNUmakefile  Wed Apr  5 11:08:50 2006
@@ -26,26 +26,35 @@
 LINKODBC=-lodbc
 # we need BOTH -lgmpxx AND -lgmp only when statically linking
 # (else libgmpxx.so pulls libgmp.so automatically)
-LDFLAGS=-lpthread  -lgmpxx -lgmp -lodbcinst
+
+# optional
+# libcarob.a usually needs -lpthread
+LDFLAGS = -lpthread
+# mandatory
+override LDFLAGS += -shared -lgmpxx -lgmp -lodbcinst
 
 CAROB=carob
 
 
 OBJS=util.o explicit_type.o env.o connect.o stmt.o abstract_item.o 
descriptors.o descriptors_records.o
-CXXFLAGS=-Wall -g3 -I${CAROB_PATH}/include
+
+# optional
+CXXFLAGS=-Wall -g3
+# mandatory
+override CXXFLAGS +=-I${CAROB_PATH}/include
 
 all: simpletest
 
 simpletest: simpletest.c ${LIBSHORT}
        c++ -Wall -g3 simpletest.c ${LINKODBC} -Wl,-rpath -Wl,. -o $@
+#      c++ -Wall -g3 simpletest.c ${LINKODBC} -o $@
 
 # libodbsequoia targets
 ${LIBSHORT}: ${LIB}
        - ln -s $^ $@
 
-# libcarob.a needs -lpthread
 ${LIB}:        ${OBJS} ${CAROB_PATH}/lib${CAROB}.a
-       ${CXX} ${CXXFLAGS} -shared $^ ${LDFLAGS} -shared -o $@
+       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} -o $@
 
 clean:
        rm -f ${LIB} ${LIBSHORT} a.out ${OBJS}

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

Reply via email to