r1715: *** empty log message ***
[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.3 2002/04/01 17:33:48 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 AR=ar
20
21 # These variables are correct for GCC
22 # you'll need to modify these for other compilers
23 CC=gcc
24 SHARED_CC_OPT=-fpic
25
26 SHARED_LD_OPT=-shared # For Linux
27 #SHARED_LD_OPT=-r # For FreeBSD and Solaris
28
29 # If you are using Solaris, these are the correct values
30 # for creating a shared library
31 #CC=cc
32 #SHARED_CC_OPT=-KPIC
33 #SHARED_LD_OPT=-G
34
35 # Nothing to configure beyond this point
36
37 BASE=clsql-uffi
38 SRC=$(BASE).c
39 OBJECT=$(BASE).o
40 SHARED=$(BASE).so
41 STATIC=$(BASE).a
42
43 all: $(SHARED) $(STATIC)
44
45 $(SHARED): $(SRC)
46         $(CC) $(SHARED_CC_OPT) -c $(SRC) -o $(OBJECT)
47         ld $(SHARED_LD_OPT) $(OBJECT) -o $(SHARED)
48         @rm $(OBJECT)
49
50 $(STATIC): $(SRC) 
51         $(CC) -c $(SRC) -o $(OBJECT)
52         $(AR) r $(STATIC) $(OBJECT)
53         @rm $(OBJECT)
54
55 clean:
56         rm -f $(SHARED) $(STATIC)
57
58 realclean: clean
59         rm -f *~
60
61