5 # Purpose: Makefile for CLSQL UFFI interface
6 # Programer: Kevin M. Rosenberg
7 # Date Started: Mar 2002
9 # CVS Id: $Id: Makefile 11058 2006-08-30 08:05:21Z kevin $
11 # This file, part of CLSQL, is Copyright (c) 2002-2006 by Kevin M. Rosenberg
13 # CLSQL users are granted the rights to distribute and use this software
14 # as governed by the terms of the Lisp Lesser GNU Public License
15 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
19 include ../Makefile.common
21 PTRBITS:=$(shell gcc -o ptrbits ptrbits.c && ./ptrbits)
31 shared_lib=$(basebits).so
32 shared_lib32=$(base)32.so
37 all: $(shared_lib) $(shared_lib32)
42 $(shared_lib): $(source) Makefile
44 gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
45 make_shared -o $(shared_lib) $(object)
48 cc -KPIC -c $(source) -o $(object)
49 cc -G $(object) -o $(shared_lib)
51 ifneq ($(OS_DARWIN),0)
52 cc -dynamic -c $(source) -o $(object)
53 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object)
54 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
56 ifneq ($(OS_CYGWIN),0)
57 gcc -c $(source) -o $(object)
58 ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
60 gcc -fPIC -DPIC -c $(source) -o $(object)
61 ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
69 $(shared_lib32): $(source) Makefile
71 gcc -m32 -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source) -o ($object32)
72 make_shared -o $(shared_lib32) $(object32)
75 cc -m32 -KPIC -c $(source) -o $(object32)
76 cc -G $(object32) -o $(shared_lib32)
78 ifneq ($(OS_DARWIN),0)
79 cc -m32 -dynamic -c $(source) -o $(object32)
80 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base)32.dylib $(object32)
81 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz32.dylib -o z.dylib
83 ifneq ($(OS_CYGWIN),0)
84 gcc -m32 -c $(source) -o $(object32)
85 ld -shared -soname=$(base) $(LDFLAGS) $(object32) -o $(shared_lib32)
87 gcc -m32 -fPIC -DPIC -c $(source) -o $(object32)
88 ld -shared -soname=$(base) -L /lib32 -L /usr/lib32 -lc $(object32) -o $(shared_lib32)
98 rm -f $(base).dylib $(base).dylib $(basebits).so $(base).o ptrbits