5 # Purpose: Makefile for CLSQL UFFI interface
6 # Programer: Kevin M. Rosenberg
7 # Date Started: Mar 2002
9 # This file, part of CLSQL, is Copyright (c) 2002-2006 by Kevin M. Rosenberg
11 # CLSQL users are granted the rights to distribute and use this software
12 # as governed by the terms of the Lisp Lesser GNU Public License
13 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 include ../Makefile.common
23 shared64_lib=$(base)64.so
29 $(shared_lib): $(source) Makefile
31 gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
32 make_shared -o $(shared_lib) $(object)
35 cc -KPIC -c $(source) -o $(object)
36 cc -G $(object) -o $(shared_lib)
38 ifneq ($(OS_DARWIN64),0)
39 cc -arch x86_64 -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress $(source) -o $(dylib)
40 cc -arch x86_64 -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
42 ifneq ($(OS_DARWIN),0)
43 cc -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress $(source) -o $(dylib)
44 cc -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
46 ifneq ($(OS_CYGWIN),0)
47 gcc -c $(source) -o $(object)
48 ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
50 ifneq ($(OS_LINUX64),0)
51 gcc -fPIC -DPIC -c $(source) -o $(object)
52 ld -shared -soname=$(base) -lc $(object) -o $(shared64_lib)
54 @echo "Ensure that you have multiarch i386 build tools if you want to build 32-bit library"
55 -gcc -m32 -fPIC -DPIC -c $(source) -o $(object)
56 -ld -melf_i386 -shared -soname=$(base) -lc $(object) -o $(shared_lib)
58 gcc -fPIC -DPIC -c $(source) -o $(object)
59 ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
71 @rm -f $(dylib) $(shared_lib) $(shared64_lib) $(object) z.dylib