dae44e93a6f06e208cdf1dfe9d3df214bf083316
[clsql.git] / interfaces / clsql-uffi / Makefile
1 # -*- Mode: Makefile -*-
2 ###########################################################################
3 # FILE IDENTIFICATION
4
5 #  Name:         Makefile
6 #  Purpose:      Makefile for the CLSQL UFFI helper package
7 #  Programer:    Kevin M. Rosenberg
8 #  Date Started: Mar 2002
9 #
10 #  CVS Id:   $Id: Makefile,v 1.5 2002/04/03 17:58:22 kevin Exp $
11 #
12 # This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
13 #
14 # CLSQL users are granted the rights to distribute and use this software
15 # as governed by the terms of the Lisp Lesser GNU Public License
16 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ###########################################################################
18
19
20 # These variables are correct for GCC
21 CC=gcc
22 SHARED_CC_OPT=-fPIC -DPIC
23 SHARED_LD_OPT=-shared  # For Linux (ALL) and FreeBSD (ACL)
24 LD=gcc
25
26 # Use these for Sun's C compiler and Solaris (ACL)
27 #CC=cc
28 #SHARED_CC_OPT=-KPIC
29 #SHARED_LD_OPT=-G
30 #LD=ld
31
32 # Nothing to configure beyond this point
33
34 base=clsql-uffi
35 source=$(base).c
36 object=$(base).o
37 shared_lib=$(base).so
38
39 all: $(shared_lib)
40
41 $(shared_lib): $(source) Makefile
42         $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
43         $(LD) ${SHARED_LD_OPT} $(object) -o $(shared_lib)
44         rm $(object)
45
46 clean:
47         rm -f $(object) $(shared_lib)
48
49 realclean: clean
50         rm -f *~
51