Version 4.1.2 - Build improvments
authorKevin Rosenberg <kevin@rosenberg.net>
Thu, 12 Nov 2009 07:43:25 +0000 (00:43 -0700)
committerKevin Rosenberg <kevin@rosenberg.net>
Thu, 12 Nov 2009 07:43:25 +0000 (00:43 -0700)
21 Nov 2009  Kevin Rosenberg <kevin@rosenberg.net>
* Version 4.1.2
* Makefiles: On 64-bit Linux systems, try to build both 32 and 64-bit
interface libraries. This requires the installation of multiarch build tools
as well as 32-bit support libraries (libc, libz and libmysqlclient).

ChangeLog
Makefile.common
db-mysql/Makefile
debian/changelog
uffi/Makefile

index 3166d4ec2009571eb2f0a2f015a7078618faf64b..16b1adf166c4e41642b785f25ebdca262be2673d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+21 Nov 2009  Kevin Rosenberg <kevin@rosenberg.net>
+       * Version 4.1.2
+       * Makefiles: On 64-bit Linux systems, try to build both 32 and 64-bit
+       interface libraries. This requires the installation of multiarch build tools
+       as well as 32-bit support libraries (libc, libz and libmysqlclient).
+
 04 Sep 2009  Kevin Rosenberg <kevin@rosenberg.net>
        * Version 4.1.1
        * sql/fdml.lisp: Rework do-query to use supplied database
index 87e43ef497a7c743af73376903d4c978df1d7ad8..dd73322efe4695cd4d2e3d69b05109fcf93a215c 100644 (file)
@@ -1,9 +1,12 @@
 UNAME=$(shell uname)
+UNAME_A=$(shell uname -a)
 
 OS_AIX=$(shell expr "$(UNAME)" : '.*AIX.*')
 OS_SUNOS=$(shell expr "$(UNAME)" : '.*SunOS.*')
 OS_DARWIN=$(shell expr "$(UNAME)" : '.*Darwin.*')
 OS_CYGWIN=$(shell expr "$(UNAME)" : '.*CYGWIN.*')
+OS_LINUX=$(shell expr "$(UNAME)" : '.*Linux.*')
+OS_LINUX64=$(shell expr "$(UNAME_A)" : '.*Linux.*x86_64.*')
 
 all:
        
index 6891f18dfd591285219b27116027fc7e9c1a3847..552b1f30a85e63715860f0a1cbc0c2861ed61c18 100644 (file)
@@ -6,8 +6,6 @@
 #  Programer:    Kevin M. Rosenberg
 #  Date Started: Mar 2002
 #
-#  CVS Id:   $Id$
-#
 # This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 #
 # CLSQL users are granted the rights to distribute and use this software
@@ -22,6 +20,7 @@ base=clsql_mysql
 source=$(base).c
 object=$(base).o
 shared_lib=$(base).so
+shared64_lib=$(base)64.so
 
 
 .PHONY: all
@@ -30,6 +29,9 @@ all: $(shared_lib)
 CFLAGS=-I /usr/local/include/mysql -I /usr/include/mysql -I /sw/include/mysql -I /opt/local/include/mysql -I /opt/local/include/mysql5/mysql -I /usr/local/mysql/include
 LDFLAGS=-L/usr/local/lib64/mysql -L/usr/local/mysql/lib32 -L/usr/local/lib/mysql -L/usr/lib/mysql -L/sw/lib -L/opt/local/lib/mysql -L/opt/local/lib/mysql5/mysql -L/usr/local/mysql/lib -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -lmysqlclient -lz -lc
 
+CFLAGS32=-I /usr/local/include/mysql -I /usr/include/mysql -I /sw/include/mysql -I /opt/local/include/mysql -I /opt/local/include/mysql5/mysql -I /usr/local/mysql/include -m32
+LDFLAGS32=-L/lib32 -L/usr/lib32 -melf_i386 -lmysqlclient -lz -lc
+
 ifneq ($(OS_CYGWIN),0)
   CFLAGS=-I /cygdrive/c/Program\ Files/MySQL/MySQL\ Server\ 5.0/include
   LDFLAGS=-L/usr/local/lib64/mysql -L/usr/local/lib/mysql -L/usr/lib/mysql -L/sw/lib -L/opt/local/lib/mysql -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -lmysqlclient -lpthread -lz -lm -lgcc -lc
@@ -53,8 +55,17 @@ else
        gcc $(CFLAGS) -DWIN32 -c $(source) -o $(object)
        ld -shared -soname=$(base)  $(object) $(LDFLAGS) -o $(shared_lib)
       else
-       gcc $(CFLAGS) -fPIC -c $(source) -o $(object)
-       ld -shared -soname=$(base) $(object) $(LDFLAGS) -o $(shared_lib)
+        ifneq ($(OS_LINUX64),0)
+         gcc $(CFLAGS) -fPIC -c $(source) -o $(object)
+         ld -shared -soname=$(base) $(object) $(LDFLAGS) -o $(shared64_lib)
+         rm $(object)
+         @echo "Ensure that you have multiarch i386 build tools and libraries if you want to build 32-bit library"
+         gcc $(CFLAGS32) -fPIC -c $(source) -o $(object)
+         ld -shared -soname=$(base) $(object) $(LDFLAGS32) -o $(shared_lib)
+        else
+         gcc $(CFLAGS) -fPIC -c $(source) -o $(object)
+         ld -shared -soname=$(base) $(object) $(LDFLAGS) -o $(shared_lib)
+        endif
       endif
     endif
   endif
index 53db8697f0824d826afac749b30dffea08fff76c..43f0e0e4ba8aa19bf00bb73166b56a982652438c 100644 (file)
@@ -1,3 +1,9 @@
+cl-sql (4.1.2-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Thu, 12 Nov 2009 00:41:04 -0700
+
 cl-sql (4.1.1-1) unstable; urgency=low
 
   * New upstream
index c1af3f8f6760770b16bdf95da5ac05b45a1618d7..ac52e34d8e1d8dcdd21a072e181469eea193aa81 100644 (file)
@@ -6,8 +6,6 @@
 #  Programer:    Kevin M. Rosenberg
 #  Date Started: Mar 2002
 #
-#  CVS Id:   $Id$
-#
 # This file, part of CLSQL, is Copyright (c) 2002-2006 by Kevin M. Rosenberg
 #
 # CLSQL users are granted the rights to distribute and use this software
@@ -22,6 +20,7 @@ base=clsql_uffi
 source=$(base).c
 object=$(base).o
 shared_lib=$(base).so
+shared64_lib=$(base)64.so
 
 .PHONY: all
 all: $(shared_lib)
@@ -44,8 +43,17 @@ else
        gcc -c $(source) -o $(object)
        ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
       else
-       gcc -fPIC -DPIC -c $(source) -o $(object)
-       ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+        ifneq ($(OS_LINUX64),0)
+         gcc -fPIC -DPIC -c $(source) -o $(object)
+         ld -shared -soname=$(base) -lc $(object) -o $(shared64_lib)
+         rm -f $(object)
+         @echo "Ensure that you have multiarch i386 build tools if you want to build 32-bit library"
+         gcc -m32 -fPIC -DPIC -c $(source) -o $(object)
+         ld -melf_i386 -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+        else
+         gcc -fPIC -DPIC -c $(source) -o $(object)
+         ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+        endif
       endif
     endif
   endif
@@ -56,7 +64,3 @@ endif
 .PHONY: distclean
 distclean: clean
        rm -f $(base).dylib $(base).dylib $(base).so $(base).o
-
-
-
-