Atualizando o codigo para a nova proposta de pacotes.

This commit is contained in:
tomas
2004-09-29 17:46:24 +00:00
parent c899c9b2e2
commit 8382ef4362
2 changed files with 9 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
# $Id: Makefile,v 1.3 2004/07/29 16:47:11 tomas Exp $
# $Id: Makefile,v 1.4 2004/09/29 17:46:24 tomas Exp $
T= lfs
@@ -9,8 +9,6 @@ DIST_DIR= luafilesystem-$V
TAR_FILE= $(DIST_DIR).tar.gz
ZIP_FILE= $(DIST_DIR).zip
LIBNAME= lib$T.$V$(LIB_EXT)
L= $T.lua
TL= t_$T.lua
SRCS= $T.c
OBJS= $T.o
@@ -18,24 +16,22 @@ OBJS= $T.o
lib: $(LIBNAME)
$(LIBNAME): $(OBJS) $(TL)
$(LIBNAME): $(OBJS)
$(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBNAME) $(OBJS) $(LIBS)
sed -e "s|LIB_NAME|$(LIB_DIR)/$(LIBNAME)|" $(TL) > $L
$(LUA_DIR)/$L: $L
mkdir -p $(LUA_DIR)
cp $L $(LUA_DIR)
install: $(LUA_DIR)/$L $(LIBNAME)
install: $(LIBNAME)
mkdir -p $(LIB_DIR)
cp $(LIBNAME) $(LIB_DIR)
ln -f -s $(LIB_DIR)/$(LIBNAME) $(LIB_DIR)/$T$(LIB_EXT)
clean:
rm -f $L $(LIBNAME) $(OBJS)
dist:
mkdir -p $(DIST_DIR)
cp config $(SRCS) $T.h $T.def $(TL) Makefile *html $(DIST_DIR)
dist: dist_dir
tar -czf $(TAR_FILE) $(DIST_DIR)
zip -rq $(ZIP_FILE) $(DIST_DIR)/*
rm -rf $(DIST_DIR)
dist_dir:
mkdir -p $(DIST_DIR)
cp config $(SRCS) $T.h $T.def Makefile *html $(DIST_DIR)

View File

@@ -1,8 +0,0 @@
-- $Id: t_lfs.lua,v 1.1 2004/07/29 14:26:33 tomas Exp $
if not lfs and loadlib then
local libname = "LIB_NAME"
local libopen = "luaopen_lfs"
local init, err1, err2 = loadlib (libname, libopen)
assert (init, (err1 or '')..(err2 or ''))
init ()
end