diff options
| author | mascarenhas <mascarenhas> | 2006-12-04 15:28:53 +0000 |
|---|---|---|
| committer | mascarenhas <mascarenhas> | 2006-12-04 15:28:53 +0000 |
| commit | 67c2187e9af4ca88aa864667a54502d01e01ddbd (patch) | |
| tree | b2e4d3344eff8aa11e4113a6bab820d17985589f | |
| parent | 5100f420b7e17298c973df021d0f9527739c6901 (diff) | |
| download | luafilesystem-67c2187e9af4ca88aa864667a54502d01e01ddbd.tar.gz luafilesystem-67c2187e9af4ca88aa864667a54502d01e01ddbd.tar.bz2 luafilesystem-67c2187e9af4ca88aa864667a54502d01e01ddbd.zip | |
Dropped Lua 5.0 support.
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | Makefile.win | 22 | ||||
| -rw-r--r-- | config | 14 | ||||
| -rw-r--r-- | config.win | 17 | ||||
| -rw-r--r-- | src/lfs.c | 6 |
5 files changed, 47 insertions, 26 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | # $Id: Makefile,v 1.28 2006/06/08 18:06:18 tomas Exp $ | 1 | # $Id: Makefile,v 1.29 2006/12/04 15:28:53 mascarenhas Exp $ |
| 2 | 2 | ||
| 3 | T= lfs | 3 | T= lfs |
| 4 | V= 1.2.1 | 4 | V= 1.2.1 |
| @@ -6,26 +6,18 @@ CONFIG= ./config | |||
| 6 | 6 | ||
| 7 | include $(CONFIG) | 7 | include $(CONFIG) |
| 8 | 8 | ||
| 9 | ifeq "$(LUA_VERSION_NUM)" "500" | ||
| 10 | COMPAT_O= $(COMPAT_DIR)/compat-5.1.o | ||
| 11 | endif | ||
| 12 | |||
| 13 | SRCS= src/$T.c | 9 | SRCS= src/$T.c |
| 14 | OBJS= src/$T.o $(COMPAT_O) | 10 | OBJS= src/$T.o |
| 15 | |||
| 16 | 11 | ||
| 17 | lib: src/$(LIBNAME) | 12 | lib: src/$(LIBNAME) |
| 18 | 13 | ||
| 19 | src/$(LIBNAME): $(OBJS) | 14 | src/$(LIBNAME): $(OBJS) |
| 20 | export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) | 15 | export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) |
| 21 | 16 | ||
| 22 | $(COMPAT_O): $(COMPAT_DIR)/compat-5.1.c | ||
| 23 | $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c | ||
| 24 | |||
| 25 | install: src/$(LIBNAME) | 17 | install: src/$(LIBNAME) |
| 26 | mkdir -p $(LUA_LIBDIR) | 18 | mkdir -p $(LUA_LIBDIR) |
| 27 | cp src/$(LIBNAME) $(LUA_LIBDIR) | 19 | cp src/$(LIBNAME) $(LUA_LIBDIR) |
| 28 | cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so | 20 | cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so |
| 29 | 21 | ||
| 30 | clean: | 22 | clean: |
| 31 | rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O) | 23 | 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 @@ | |||
| 1 | # $Id: Makefile.win,v 1.1 2006/12/04 15:28:53 mascarenhas Exp $ | ||
| 2 | |||
| 3 | T= lfs | ||
| 4 | V= 1.2.1 | ||
| 5 | CONFIG= ./config.win | ||
| 6 | |||
| 7 | include $(CONFIG) | ||
| 8 | |||
| 9 | SRCS= src/$T.c | ||
| 10 | OBJS= src/$T.obj | ||
| 11 | |||
| 12 | lib: src/$(LIBNAME) | ||
| 13 | |||
| 14 | src/$(LIBNAME): $(OBJS) | ||
| 15 | link /dll /out:src/$(LIBNAME) $(OBJS) $(LUA_LIB) | ||
| 16 | |||
| 17 | install: src/$(LIBNAME) | ||
| 18 | mkdir -p $(LUA_LIBDIR) | ||
| 19 | copy src/$(LIBNAME) $(LUA_LIBDIR) | ||
| 20 | |||
| 21 | clean: | ||
| 22 | del src/$(LIBNAME) $(OBJS) | ||
| @@ -1,25 +1,19 @@ | |||
| 1 | # Installation directories | 1 | # Installation directories |
| 2 | # System's libraries directory (where binary libraries are installed) | 2 | # System's libraries directory (where binary libraries are installed) |
| 3 | LUA_LIBDIR= /usr/local/lib/lua/5.0 | 3 | LUA_LIBDIR= /usr/local/lib/lua/5.1 |
| 4 | # Lua includes directory | 4 | # Lua includes directory |
| 5 | LUA_INC= /usr/local/include | 5 | LUA_INC= /usr/include/lua5.1 |
| 6 | 6 | ||
| 7 | # OS dependent | 7 | # OS dependent |
| 8 | LIB_OPTION= -shared #for Linux | 8 | LIB_OPTION= -shared #for Linux |
| 9 | #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X | 9 | #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X |
| 10 | 10 | ||
| 11 | LIBNAME= $T.so.$V | 11 | LIBNAME= $T.so.$V |
| 12 | # Lua version number | ||
| 13 | # (according to Lua 5.1 definition: | ||
| 14 | # first version digit * 100 + second version digit | ||
| 15 | # e.g. Lua 5.0.2 => 500, Lua 5.1 => 501, Lua 5.1.1 => 501) | ||
| 16 | LUA_VERSION_NUM= 500 | ||
| 17 | COMPAT_DIR= ../compat/src | ||
| 18 | 12 | ||
| 19 | # Compilation directives | 13 | # Compilation directives |
| 20 | WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings | 14 | WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings |
| 21 | INCS= -I$(LUA_INC) -I$(COMPAT_DIR) | 15 | INCS= -I$(LUA_INC) |
| 22 | CFLAGS= $(WARN) $(INCS) | 16 | CFLAGS= $(WARN) $(INCS) |
| 23 | CC= gcc | 17 | CC= gcc |
| 24 | 18 | ||
| 25 | # $Id: config,v 1.15 2006/06/08 16:23:25 tomas Exp $ | 19 | # $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 @@ | |||
| 1 | # Installation directories | ||
| 2 | # System's libraries directory (where binary libraries are installed) | ||
| 3 | LUA_LIBDIR= c:/lua51/lib | ||
| 4 | # Lua includes directory | ||
| 5 | LUA_INC= c:/lua51/include | ||
| 6 | # Lua library | ||
| 7 | LUA_LIB= c:/lua51/bin/lua51.lib | ||
| 8 | |||
| 9 | LIBNAME= $T.dll | ||
| 10 | |||
| 11 | # Compilation directives | ||
| 12 | WARN= /O2 /Wall | ||
| 13 | INCS= /I$(LUA_INC) | ||
| 14 | CFLAGS= $(WARN) $(INCS) | ||
| 15 | CC= cl | ||
| 16 | |||
| 17 | # $Id: config.win,v 1.1 2006/12/04 15:28:53 mascarenhas Exp $ | ||
| @@ -14,7 +14,7 @@ | |||
| 14 | ** lfs.touch (filepath [, atime [, mtime]]) | 14 | ** lfs.touch (filepath [, atime [, mtime]]) |
| 15 | ** lfs.unlock (fh) | 15 | ** lfs.unlock (fh) |
| 16 | ** | 16 | ** |
| 17 | ** $Id: lfs.c,v 1.34 2006/06/08 18:06:18 tomas Exp $ | 17 | ** $Id: lfs.c,v 1.35 2006/12/04 15:28:53 mascarenhas Exp $ |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <errno.h> | 20 | #include <errno.h> |
| @@ -39,10 +39,6 @@ | |||
| 39 | #include "lua.h" | 39 | #include "lua.h" |
| 40 | #include "lauxlib.h" | 40 | #include "lauxlib.h" |
| 41 | #include "lualib.h" | 41 | #include "lualib.h" |
| 42 | #if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 | ||
| 43 | #include "compat-5.1.h" | ||
| 44 | #endif | ||
| 45 | |||
| 46 | #include "lfs.h" | 42 | #include "lfs.h" |
| 47 | 43 | ||
| 48 | /* Define 'strerror' for systems that do not implement it */ | 44 | /* Define 'strerror' for systems that do not implement it */ |
