mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-24 20:33:06 +00:00
Dropped Lua 5.0 support.
This commit is contained in:
14
Makefile
14
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
|
T= lfs
|
||||||
V= 1.2.1
|
V= 1.2.1
|
||||||
@@ -6,26 +6,18 @@ CONFIG= ./config
|
|||||||
|
|
||||||
include $(CONFIG)
|
include $(CONFIG)
|
||||||
|
|
||||||
ifeq "$(LUA_VERSION_NUM)" "500"
|
|
||||||
COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
SRCS= src/$T.c
|
SRCS= src/$T.c
|
||||||
OBJS= src/$T.o $(COMPAT_O)
|
OBJS= src/$T.o
|
||||||
|
|
||||||
|
|
||||||
lib: src/$(LIBNAME)
|
lib: src/$(LIBNAME)
|
||||||
|
|
||||||
src/$(LIBNAME): $(OBJS)
|
src/$(LIBNAME): $(OBJS)
|
||||||
export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o 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)
|
install: src/$(LIBNAME)
|
||||||
mkdir -p $(LUA_LIBDIR)
|
mkdir -p $(LUA_LIBDIR)
|
||||||
cp src/$(LIBNAME) $(LUA_LIBDIR)
|
cp src/$(LIBNAME) $(LUA_LIBDIR)
|
||||||
cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so
|
cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O)
|
rm -f src/$(LIBNAME) $(OBJS)
|
||||||
|
|||||||
22
Makefile.win
Normal file
22
Makefile.win
Normal file
@@ -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)
|
||||||
14
config
14
config
@@ -1,25 +1,19 @@
|
|||||||
# Installation directories
|
# Installation directories
|
||||||
# System's libraries directory (where binary libraries are installed)
|
# 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 includes directory
|
||||||
LUA_INC= /usr/local/include
|
LUA_INC= /usr/include/lua5.1
|
||||||
|
|
||||||
# OS dependent
|
# OS dependent
|
||||||
LIB_OPTION= -shared #for Linux
|
LIB_OPTION= -shared #for Linux
|
||||||
#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
|
#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
|
||||||
|
|
||||||
LIBNAME= $T.so.$V
|
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
|
# Compilation directives
|
||||||
WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
|
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)
|
CFLAGS= $(WARN) $(INCS)
|
||||||
CC= gcc
|
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 $
|
||||||
|
|||||||
17
config.win
Normal file
17
config.win
Normal file
@@ -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 $
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
** lfs.touch (filepath [, atime [, mtime]])
|
** lfs.touch (filepath [, atime [, mtime]])
|
||||||
** lfs.unlock (fh)
|
** 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 <errno.h>
|
#include <errno.h>
|
||||||
@@ -39,10 +39,6 @@
|
|||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
#include "lualib.h"
|
#include "lualib.h"
|
||||||
#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
|
|
||||||
#include "compat-5.1.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "lfs.h"
|
#include "lfs.h"
|
||||||
|
|
||||||
/* Define 'strerror' for systems that do not implement it */
|
/* Define 'strerror' for systems that do not implement it */
|
||||||
|
|||||||
Reference in New Issue
Block a user