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
28 $(shared_lib): $(source) Makefile
30 gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
31 make_shared -o $(shared_lib) $(object)
34 cc -KPIC -c $(source) -o $(object)
35 cc -G $(object) -o $(shared_lib)
37 ifneq ($(OS_DARWIN),0)
38 cc -dynamic -c $(source) -o $(object)
39 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object)
40 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
42 ifneq ($(OS_CYGWIN),0)
43 gcc -c $(source) -o $(object)
44 ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
46 ifneq ($(OS_LINUX64),0)
47 gcc -fPIC -DPIC -c $(source) -o $(object)
48 ld -shared -soname=$(base) -lc $(object) -o $(shared64_lib)
50 @echo "Ensure that you have multiarch i386 build tools if you want to build 32-bit library"
51 -gcc -m32 -fPIC -DPIC -c $(source) -o $(object)
52 -ld -melf_i386 -shared -soname=$(base) -lc $(object) -o $(shared_lib)
54 gcc -fPIC -DPIC -c $(source) -o $(object)
55 ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
66 rm -f $(base).dylib $(base).dylib $(base).so $(base).o