r1713: *** 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.2 2002/04/01 05:27:55 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 SHARED_LD_OPT=-shared
26
27 # If you are using Solaris, these are the correct values
28 # for creating a shared library
29 #CC=cc
30 #SHARED_CC_OPT=-KPIC
31 #SHARED_LD_OPT=-G
32
33 # Nothing to configure beyond this point
34
35 BASE=clsql-uffi
36 SRC=$(BASE).c
37 OBJECT=$(BASE).o
38 SHARED=$(BASE).so
39 STATIC=$(BASE).a
40
41 all: $(SHARED) $(STATIC)
42
43 $(SHARED): $(SRC)
44         $(CC) $(SHARED_CC_OPT) -c $(SRC) -o $(OBJECT)
45         ld $(SHARED_LD_OPT) $(OBJECT) -o $(SHARED)
46         @rm $(OBJECT)
47
48 $(STATIC): $(SRC) 
49         $(CC) -c $(SRC) -o $(OBJECT)
50         $(AR) r $(STATIC) $(OBJECT)
51         @rm $(OBJECT)
52
53 clean:
54         rm -f $(SHARED) $(STATIC)
55
56 realclean: clean
57         rm -f *~
58
59