Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removing Compat-5.1 and adding -fPIC

Version 2.3
  • Loading branch information...
commit ad1b17df936ad6f73639bf857166be986ec8b2d6 1 parent 7aea02d
Tomás Guisasola tomasguisasola authored

Showing 2 changed files with 12 additions and 16 deletions. Show diff stats Hide diff stats

  1. +3 10 Makefile
  2. +9 6 config
13 Makefile
... ... @@ -1,13 +1,9 @@
1   -V= 2.2.0
  1 +V= 2.3.0
2 2 CONFIG= ./config
3 3
4 4 include $(CONFIG)
5 5
6   -ifeq "$(LUA_VERSION_NUM)" "500"
7   -COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
8   -endif
9   -
10   -OBJS= src/luasql.o src/ls_$T.o $(COMPAT_O)
  6 +OBJS= src/luasql.o src/ls_$T.o
11 7
12 8
13 9 SRCS= src/luasql.h src/luasql.c \
@@ -28,9 +24,6 @@ lib: src/$(LIBNAME)
28 24 src/$(LIBNAME): $(OBJS)
29 25 export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) -o $@ $(LIB_OPTION) $(OBJS) $(DRIVER_LIBS)
30 26
31   -$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c
32   - $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
33   -
34 27 install:
35 28 mkdir -p $(LUA_LIBDIR)/luasql
36 29 cp src/$(LIBNAME) $(LUA_LIBDIR)/luasql
@@ -39,6 +32,6 @@ jdbc_driver:
39 32 cd src/jdbc; make $@
40 33
41 34 clean:
42   - rm -f src/$(LIBNAME) src/*.o $(COMPAT_O)
  35 + rm -f src/$(LIBNAME) src/*.o
43 36
44 37 # $Id: Makefile,v 1.56 2008/05/30 17:21:18 tomas Exp $
15 config
... ... @@ -1,10 +1,10 @@
1 1 # $Id: config,v 1.10 2008/05/30 17:21:18 tomas Exp $
2 2
3 3 # Driver (leave uncommented ONLY the line with the name of the driver)
4   -#T= mysql
  4 +T= mysql
5 5 #T= oci8
6 6 #T= odbc
7   -T= postgres
  7 +#T= postgres
8 8 #T= sqlite
9 9 #T=sqlite3
10 10 #T=firebird
@@ -31,19 +31,22 @@ LIB_OPTION= -shared #for Linux
31 31 #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
32 32
33 33 LIBNAME= $T.so
34   -COMPAT_DIR= ../compat/src
35 34
36 35 # Compilation parameters
37 36 # Driver specific
38 37 ######## MySQL
39 38 #DRIVER_LIBS= -L/usr/local/mysql/lib -lmysqlclient -lz
40 39 #DRIVER_INCS= -I/usr/local/mysql/include
  40 +DRIVER_LIBS= -L/usr/lib -lmysqlclient -lz
  41 +DRIVER_INCS= -I/usr/include/mysql
41 42 ######## Oracle OCI8
42 43 #DRIVER_LIBS= -L/home/oracle/OraHome1/lib -lz -lclntsh
43 44 #DRIVER_INCS= -I/home/oracle/OraHome1/rdbms/demo -I/home/oracle/OraHome1/rdbms/public
44 45 ######## PostgreSQL
45   -DRIVER_LIBS= -L/usr/local/pgsql/lib -lpq
46   -DRIVER_INCS= -I/usr/local/pgsql/include/
  46 +#DRIVER_LIBS= -L/usr/local/pgsql/lib -lpq
  47 +#DRIVER_INCS= -I/usr/local/pgsql/include/
  48 +#DRIVER_LIBS= -L/usr/lib -lpq
  49 +#DRIVER_INCS= -I/usr/include/postgresql
47 50 ######## SQLite
48 51 #DRIVER_LIBS= -lsqlite
49 52 #DRIVER_INCS=
@@ -59,7 +62,7 @@ DRIVER_INCS= -I/usr/local/pgsql/include/
59 62
60 63 WARN= -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
61 64 INCS= -I$(LUA_INC)
62   -CFLAGS= -O2 $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS)
  65 +CFLAGS= -O2 $(WARN) -fPIC $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS)
63 66 CC= gcc
64 67
65 68 # $Id: config,v 1.10 2008/05/30 17:21:18 tomas Exp $

0 comments on commit ad1b17d

Please sign in to comment.
Something went wrong with that request. Please try again.