2 ##########################################################################
6 # Purpose: Makefile for CLSQL UFFI interface
7 # Programer: Kevin M. Rosenberg
8 # Date Started: Mar 2002
10 # This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg
12 # CLSQL users are granted the rights to distribute and use this software
13 # as governed by the terms of the Lisp Lesser GNU Public License
14 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15 ##########################################################################
20 include ../Makefile.common
22 PTRBITS:=$(shell gcc -o ptrbits ptrbits.c && ./ptrbits)
32 shared_lib=$(basebits).so
33 shared_lib32=$(base)32.so
38 all: $(shared_lib) $(shared_lib32)
43 $(shared_lib): $(source) Makefile
45 gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
46 make_shared -o $(shared_lib) $(object)
49 cc -KPIC -c $(source) -o $(object)
50 cc -G $(object) -o $(shared_lib)
52 ifneq ($(OS_DARWIN),0)
53 cc -dynamic -c $(source) -o $(object)
54 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object)
55 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
57 ifneq ($(OS_CYGWIN),0)
58 gcc -c $(source) -o $(object)
59 ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
61 gcc -fPIC -DPIC -c $(source) -o $(object)
62 ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
70 $(shared_lib32): $(source) Makefile
72 gcc -m32 -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source) -o ($object32)
73 make_shared -o $(shared_lib32) $(object32)
76 cc -m32 -KPIC -c $(source) -o $(object32)
77 cc -G $(object32) -o $(shared_lib32)
79 ifneq ($(OS_DARWIN),0)
80 cc -m32 -dynamic -c $(source) -o $(object32)
81 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base)32.dylib $(object32)
82 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz32.dylib -o z.dylib
84 ifneq ($(OS_CYGWIN),0)
85 gcc -m32 -c $(source) -o $(object32)
86 ld -shared -soname=$(base) $(LDFLAGS) $(object32) -o $(shared_lib32)
88 gcc -m32 -fPIC -DPIC -c $(source) -o $(object32)
89 ld -shared -soname=$(base) -L /lib32 -L /usr/lib32 -lc $(object32) -o $(shared_lib32)
99 rm -f $(base).dylib $(base).dylib $(basebits).so $(base).o ptrbits