From 67c2187e9af4ca88aa864667a54502d01e01ddbd Mon Sep 17 00:00:00 2001 From: mascarenhas Date: Mon, 4 Dec 2006 15:28:53 +0000 Subject: [PATCH] Dropped Lua 5.0 support. --- Makefile | 14 +++----------- Makefile.win | 22 ++++++++++++++++++++++ config | 14 ++++---------- config.win | 17 +++++++++++++++++ src/lfs.c | 6 +----- 5 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 Makefile.win create mode 100644 config.win diff --git a/Makefile b/Makefile index 2c11b58..068f309 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.28 2006/06/08 18:06:18 tomas Exp $ +# $Id: Makefile,v 1.29 2006/12/04 15:28:53 mascarenhas Exp $ T= lfs V= 1.2.1 @@ -6,26 +6,18 @@ CONFIG= ./config include $(CONFIG) -ifeq "$(LUA_VERSION_NUM)" "500" -COMPAT_O= $(COMPAT_DIR)/compat-5.1.o -endif - SRCS= src/$T.c -OBJS= src/$T.o $(COMPAT_O) - +OBJS= src/$T.o lib: src/$(LIBNAME) src/$(LIBNAME): $(OBJS) export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) -$(COMPAT_O): $(COMPAT_DIR)/compat-5.1.c - $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c - install: src/$(LIBNAME) mkdir -p $(LUA_LIBDIR) cp src/$(LIBNAME) $(LUA_LIBDIR) cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so clean: - rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O) + rm -f src/$(LIBNAME) $(OBJS) diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..b9cddc8 --- /dev/null +++ b/Makefile.win @@ -0,0 +1,22 @@ +# $Id: Makefile.win,v 1.1 2006/12/04 15:28:53 mascarenhas Exp $ + +T= lfs +V= 1.2.1 +CONFIG= ./config.win + +include $(CONFIG) + +SRCS= src/$T.c +OBJS= src/$T.obj + +lib: src/$(LIBNAME) + +src/$(LIBNAME): $(OBJS) + link /dll /out:src/$(LIBNAME) $(OBJS) $(LUA_LIB) + +install: src/$(LIBNAME) + mkdir -p $(LUA_LIBDIR) + copy src/$(LIBNAME) $(LUA_LIBDIR) + +clean: + del src/$(LIBNAME) $(OBJS) diff --git a/config b/config index 9958952..1265b77 100644 --- a/config +++ b/config @@ -1,25 +1,19 @@ # Installation directories # System's libraries directory (where binary libraries are installed) -LUA_LIBDIR= /usr/local/lib/lua/5.0 +LUA_LIBDIR= /usr/local/lib/lua/5.1 # Lua includes directory -LUA_INC= /usr/local/include +LUA_INC= /usr/include/lua5.1 # OS dependent LIB_OPTION= -shared #for Linux #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X LIBNAME= $T.so.$V -# Lua version number -# (according to Lua 5.1 definition: -# first version digit * 100 + second version digit -# e.g. Lua 5.0.2 => 500, Lua 5.1 => 501, Lua 5.1.1 => 501) -LUA_VERSION_NUM= 500 -COMPAT_DIR= ../compat/src # Compilation directives WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -INCS= -I$(LUA_INC) -I$(COMPAT_DIR) +INCS= -I$(LUA_INC) CFLAGS= $(WARN) $(INCS) CC= gcc -# $Id: config,v 1.15 2006/06/08 16:23:25 tomas Exp $ +# $Id: config,v 1.16 2006/12/04 15:28:53 mascarenhas Exp $ diff --git a/config.win b/config.win new file mode 100644 index 0000000..0259106 --- /dev/null +++ b/config.win @@ -0,0 +1,17 @@ +# Installation directories +# System's libraries directory (where binary libraries are installed) +LUA_LIBDIR= c:/lua51/lib +# Lua includes directory +LUA_INC= c:/lua51/include +# Lua library +LUA_LIB= c:/lua51/bin/lua51.lib + +LIBNAME= $T.dll + +# Compilation directives +WARN= /O2 /Wall +INCS= /I$(LUA_INC) +CFLAGS= $(WARN) $(INCS) +CC= cl + +# $Id: config.win,v 1.1 2006/12/04 15:28:53 mascarenhas Exp $ diff --git a/src/lfs.c b/src/lfs.c index 43d5e9e..e361bd6 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -14,7 +14,7 @@ ** lfs.touch (filepath [, atime [, mtime]]) ** lfs.unlock (fh) ** -** $Id: lfs.c,v 1.34 2006/06/08 18:06:18 tomas Exp $ +** $Id: lfs.c,v 1.35 2006/12/04 15:28:53 mascarenhas Exp $ */ #include @@ -39,10 +39,6 @@ #include "lua.h" #include "lauxlib.h" #include "lualib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - #include "lfs.h" /* Define 'strerror' for systems that do not implement it */