4 # Purpose: Makefile for UFFI examples
5 # Programer: Kevin M. Rosenberg
6 # Date Started: Mar 2002
8 # CVS Id: $Id: Makefile,v 1.7 2002/04/03 00:57:48 kevin Exp $
10 # This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
12 # UFFI 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.
18 # These variables are correct for GCC
20 #SHARED_CC_OPT=-fPIC # For Linux (ACL) and all platfroms (CMUCL)
21 SHARED_CC_OPT=-fPIC -DPIC # For FreeBSD (ACL)
23 #SHARED_LD_OPT=-shared # For Linux
24 #SHARED_LD_OPT=-r # For Linux and Solaris (CMUCL)
25 SHARED_LD_OPT=-Bshareable -Bdynamic # For FreeBSD (ACL)
27 # If you are using Solaris with Sun's CC, these are the correct values
28 # for creating a shared library
36 # Nothing to configure beyond this point
42 all: $(shared_lib) $(static_lib)
44 $(shared_lib): $(source)
45 $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
46 ld ${SHARED_LD_OPT} $(object) -o $(shared_lib)
47 $(AR) r $(static_lib) $(object)
50 $(static_lib): $(source)
51 ${CC} -c -fpic $(source) -o $(object)
52 $(AR) r $(static_lib) $(object)
56 rm -f $(object) $(static_lib) $(shared_lib)