Permalink
Browse files

Removing Compat-5.1 and adding -fPIC

Version 2.3
  • Loading branch information...
1 parent 7aea02d commit ad1b17df936ad6f73639bf857166be986ec8b2d6 @tomasguisasola tomasguisasola committed with tomasguisasola Mar 26, 2012
Showing with 12 additions and 16 deletions.
  1. +3 −10 Makefile
  2. +9 −6 config
View
@@ -1,13 +1,9 @@
-V= 2.2.0
+V= 2.3.0
CONFIG= ./config
include $(CONFIG)
-ifeq "$(LUA_VERSION_NUM)" "500"
-COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
-endif
-
-OBJS= src/luasql.o src/ls_$T.o $(COMPAT_O)
+OBJS= src/luasql.o src/ls_$T.o
SRCS= src/luasql.h src/luasql.c \
@@ -28,9 +24,6 @@ lib: src/$(LIBNAME)
src/$(LIBNAME): $(OBJS)
export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) -o $@ $(LIB_OPTION) $(OBJS) $(DRIVER_LIBS)
-$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c
- $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
-
install:
mkdir -p $(LUA_LIBDIR)/luasql
cp src/$(LIBNAME) $(LUA_LIBDIR)/luasql
@@ -39,6 +32,6 @@ jdbc_driver:
cd src/jdbc; make $@
clean:
- rm -f src/$(LIBNAME) src/*.o $(COMPAT_O)
+ rm -f src/$(LIBNAME) src/*.o
# $Id: Makefile,v 1.56 2008/05/30 17:21:18 tomas Exp $
View
15 config
@@ -1,10 +1,10 @@
# $Id: config,v 1.10 2008/05/30 17:21:18 tomas Exp $
# Driver (leave uncommented ONLY the line with the name of the driver)
-#T= mysql
+T= mysql
#T= oci8
#T= odbc
-T= postgres
+#T= postgres
#T= sqlite
#T=sqlite3
#T=firebird
@@ -31,19 +31,22 @@ LIB_OPTION= -shared #for Linux
#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
LIBNAME= $T.so
-COMPAT_DIR= ../compat/src
# Compilation parameters
# Driver specific
######## MySQL
#DRIVER_LIBS= -L/usr/local/mysql/lib -lmysqlclient -lz
#DRIVER_INCS= -I/usr/local/mysql/include
+DRIVER_LIBS= -L/usr/lib -lmysqlclient -lz
+DRIVER_INCS= -I/usr/include/mysql
######## Oracle OCI8
#DRIVER_LIBS= -L/home/oracle/OraHome1/lib -lz -lclntsh
#DRIVER_INCS= -I/home/oracle/OraHome1/rdbms/demo -I/home/oracle/OraHome1/rdbms/public
######## PostgreSQL
-DRIVER_LIBS= -L/usr/local/pgsql/lib -lpq
-DRIVER_INCS= -I/usr/local/pgsql/include/
+#DRIVER_LIBS= -L/usr/local/pgsql/lib -lpq
+#DRIVER_INCS= -I/usr/local/pgsql/include/
+#DRIVER_LIBS= -L/usr/lib -lpq
+#DRIVER_INCS= -I/usr/include/postgresql
######## SQLite
#DRIVER_LIBS= -lsqlite
#DRIVER_INCS=
@@ -59,7 +62,7 @@ DRIVER_INCS= -I/usr/local/pgsql/include/
WARN= -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
INCS= -I$(LUA_INC)
-CFLAGS= -O2 $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS)
+CFLAGS= -O2 $(WARN) -fPIC $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS)
CC= gcc
# $Id: config,v 1.10 2008/05/30 17:21:18 tomas Exp $

0 comments on commit ad1b17d

Please sign in to comment.