r1728: *** 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.8 2002/04/03 03:58:00 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=-shared  # For Linux (ACL,LW,CMUCL)
22 #SHARED_LD_OPT=-r # For Linux and Solaris (CMUCL)
23 SHARED_LD_OPT=-Bshareable -Bdynamic  # For Linux (ALL) and FreeBSD (ACL)
24
25 # Use these for Sun's C compiler and Solaris (ACL)
26 #CC=cc
27 #SHARED_CC_OPT=-KPIC
28 #SHARED_LD_OPT=-G
29
30
31 base=c-test-fns
32
33 # Nothing to configure beyond this point
34 source=$(base).c
35 object=$(base).o
36 shared_lib=$(base).so
37
38 all: $(shared_lib)
39
40 $(shared_lib): $(source) Makefile
41         $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
42         ld ${SHARED_LD_OPT} $(object) -o $(shared_lib)
43         rm $(object)
44
45 clean:
46         rm -f $(object) $(shared_lib)
47
48 realclean: clean
49         rm -f *~