X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=uffi%2FMakefile;h=3602885812ad984f045caeaf8c3b3069efa13228;hp=c1af3f8f6760770b16bdf95da5ac05b45a1618d7;hb=7f19bddd692bd20f3762c2fda670911696ea2b23;hpb=f10c3dcbe75b5532d6646e24ecd25f5651a0c3a9 diff --git a/uffi/Makefile b/uffi/Makefile index c1af3f8..3602885 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,19 +43,24 @@ 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 endif - rm $(object) + rm -f $(object) .PHONY: distclean distclean: clean rm -f $(base).dylib $(base).dylib $(base).so $(base).o - - - -