r1735: *** empty log message ***
[uffi.git] / tests / 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.12 2002/04/03 17:52:53 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 # GCC Section
18 CC=gcc
19 SHARED_CC_OPT=-fPIC -DPIC
20
21 SHARED_LD_OPT=-shared  # For Linux (ALL) and FreeBSD (ACL)
22
23 # For MacOSX (ACL)
24 #SHARED_CC_OPT=-dynamic
25 #SHARED_LD_OPT=-bundle /usr/lib/bundle1.o -undefined suppress # -o foo.dylib foo.o
26
27 # Use these for Sun's C compiler and Solaris (ACL)
28 #CC=cc
29 #SHARED_CC_OPT=-KPIC
30 #SHARED_LD_OPT=-G
31
32
33 # Nothing to configure beyond this point
34
35 base=c-test-fns
36 source=$(base).c
37 object=$(base).o
38 shared_lib=$(base).so
39
40 all: $(shared_lib)
41
42 $(shared_lib): $(source) Makefile
43         $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
44         gcc ${SHARED_LD_OPT} $(object) -o $(shared_lib)
45         rm $(object)
46
47 clean:
48         rm -f $(object) $(shared_lib)
49
50 realclean: clean
51         rm -f *~