X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=uffi%2FMakefile;h=56d4bb26be4e68a26be3fef967c6563b899448c3;hb=4e13a7c3d278d8a8a9cd39d72f82355c5a76e6eb;hp=c1af3f8f6760770b16bdf95da5ac05b45a1618d7;hpb=f10c3dcbe75b5532d6646e24ecd25f5651a0c3a9;p=clsql.git diff --git a/uffi/Makefile b/uffi/Makefile index c1af3f8..56d4bb2 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 - - - -