From 244328d6a2b108b8d4448df06034ca088e313440 Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Thu, 12 Nov 2009 00:43:25 -0700 Subject: [PATCH] Version 4.1.2 - Build improvments 21 Nov 2009 Kevin Rosenberg * 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 | 6 ++++++ Makefile.common | 3 +++ db-mysql/Makefile | 19 +++++++++++++++---- debian/changelog | 6 ++++++ uffi/Makefile | 20 ++++++++++++-------- 5 files changed, 42 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3166d4e..16b1adf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +21 Nov 2009 Kevin Rosenberg + * 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 * Version 4.1.1 * sql/fdml.lisp: Rework do-query to use supplied database diff --git a/Makefile.common b/Makefile.common index 87e43ef..dd73322 100644 --- a/Makefile.common +++ b/Makefile.common @@ -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: diff --git a/db-mysql/Makefile b/db-mysql/Makefile index 6891f18..552b1f3 100644 --- a/db-mysql/Makefile +++ b/db-mysql/Makefile @@ -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 diff --git a/debian/changelog b/debian/changelog index 53db869..43f0e0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-sql (4.1.2-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Thu, 12 Nov 2009 00:41:04 -0700 + cl-sql (4.1.1-1) unstable; urgency=low * New upstream diff --git a/uffi/Makefile b/uffi/Makefile index c1af3f8..ac52e34 100644 --- a/uffi/Makefile +++ b/uffi/Makefile @@ -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 - - - - -- 2.34.1