2018-10-30 19:41:24 -03:00
|
|
|
V= 2.4.0
|
2005-06-06 20:11:52 +00:00
|
|
|
CONFIG= ./config
|
2004-11-08 15:55:23 +00:00
|
|
|
|
2005-06-06 20:11:52 +00:00
|
|
|
include $(CONFIG)
|
2003-04-07 13:41:29 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
OBJS= src/luasql.o
|
|
|
|
SRCS= src/luasql.h src/luasql.c
|
2004-11-08 15:55:23 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
# list of all driver names
|
|
|
|
DRIVER_LIST= $(subst src/ls_,,$(basename $(wildcard src/ls_*.c)))
|
2003-12-01 16:13:13 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
# used for help formatting
|
|
|
|
EMPTY=
|
|
|
|
SPACE= $(EMPTY) $(EMPTY)
|
2003-04-07 13:41:29 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
all :
|
|
|
|
@echo "usage: make { $(subst $(SPACE),$(SPACE)|$(SPACE),$(DRIVER_LIST)) }"
|
2003-04-07 13:41:29 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
# explicity matches against the list of avilable driver names
|
|
|
|
$(DRIVER_LIST) : % : src/%.so
|
2004-11-08 15:55:23 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
# builds the specified driver
|
|
|
|
src/%.so : src/ls_%.c $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) src/ls_$*.c -o $@ $(LIB_OPTION) $(OBJS) $(DRIVER_INCS_$*) $(DRIVER_LIBS_$*)
|
2004-11-09 13:15:17 +00:00
|
|
|
|
2015-08-13 18:34:00 +01:00
|
|
|
# builds the general LuaSQL functions
|
|
|
|
$(OBJS) : $(SRCS)
|
|
|
|
$(CC) $(CFLAGS) -c src/luasql.c -o src/luasql.o
|
2004-10-15 12:28:07 +00:00
|
|
|
|
2004-11-08 15:55:23 +00:00
|
|
|
install:
|
2005-01-19 14:56:25 +00:00
|
|
|
mkdir -p $(LUA_LIBDIR)/luasql
|
2015-08-13 18:34:00 +01:00
|
|
|
cp src/*.so $(LUA_LIBDIR)/luasql
|
2003-05-26 11:28:31 +00:00
|
|
|
|
2004-11-26 12:29:08 +00:00
|
|
|
jdbc_driver:
|
2005-04-25 17:09:11 +00:00
|
|
|
cd src/jdbc; make $@
|
2004-11-25 16:06:08 +00:00
|
|
|
|
2003-04-07 13:41:29 +00:00
|
|
|
clean:
|
2015-08-13 18:34:00 +01:00
|
|
|
rm -f src/*.so src/*.o
|
2005-04-25 17:09:11 +00:00
|
|
|
|