1 # -*- Mode: Makefile -*-
2 ###########################################################################
6 # Purpose: Makefile for the CLSQL UFFI helper package
7 # Programer: Kevin M. Rosenberg
8 # Date Started: Mar 2002
10 # CVS Id: $Id: Makefile,v 1.1 2002/08/01 03:06:26 kevin Exp $
12 # This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
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 ###########################################################################
19 # These variables are correct for GCC
21 SHARED_CC_OPT=-fPIC -DPIC
25 # Use these for Sun's C compiler and Solaris (ACL)
31 # May need to change to the directory where you have installed mysql's library
32 vpath %.so /usr/lib /usr/local/lib /opt/mysql/lib/mysql
33 vpath %.h /usr/include /usr/include/mysql /usr/local/include /usr/local/include/mysql /opt/mysql/include/mysql
34 INCLUDE_DIRS=-I/usr/include/mysql -I/usr/local/include/mysql -I/opt/mysql/include/mysql -I/usr/include -I/usr/local/include
36 # Nothing to configure beyond this point
43 .PHONY: all clean distclean
47 compile: $(shared_lib)
49 $(object): $(source) mysql.h
50 $(CC) ${SHARED_CC_OPT} $(INCLUDE_DIRS) -c $< -o $@
52 $(shared_lib): $(object) -lmysqlclient
53 $(LD) ${SHARED_LD_OPT} $^ -o $@
56 @rm -f $(object) $(shared_lib) *~