r1732: *** empty log message ***
[uffi.git] / examples / Makefile
1 # FILE IDENTIFICATION
2 #
3 #  Name:         Makefile
4 #  Purpose:      Makefile for UFFI examples
5 #  Programer:    Kevin M. Rosenberg
6 #  Date Started: Mar 2002
7 #
8 #  CVS Id:   $Id: Makefile,v 1.9 2002/04/03 06:10:05 kevin Exp $
9 #
10 # This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
11 #
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.
15
16
17 # These variables are correct for GCC
18 CC=gcc
19 SHARED_CC_OPT=-fPIC -DPIC
20
21 #SHARED_LD_OPT=-r # For FreeBSD and Solaris (CMUCL)
22 SHARED_LD_OPT=-Bshareable -Bdynamic  # For Linux (ALL) and FreeBSD (ACL)
23
24 # Use these for Sun's C compiler and Solaris (ACL)
25 #CC=cc
26 #SHARED_CC_OPT=-KPIC
27 #SHARED_LD_OPT=-G
28
29
30 # Nothing to configure beyond this point
31
32 base=c-test-fns
33 source=$(base).c
34 object=$(base).o
35 shared_lib=$(base).so
36
37 all: $(shared_lib)
38
39 $(shared_lib): $(source) Makefile
40         $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
41         ld ${SHARED_LD_OPT} $(object) -o $(shared_lib)
42         rm $(object)
43
44 clean:
45         rm -f $(object) $(shared_lib)
46
47 realclean: clean
48         rm -f *~