From 804e97640761023561a8ef791f0151653c41da97 Mon Sep 17 00:00:00 2001 From: mascarenhas Date: Wed, 23 Jan 2008 02:48:47 +0000 Subject: updated makefile for vc2008 --- Makefile | 15 +++++++-------- Makefile.win | 15 ++++++++------- rockspecs/luafilesystem-cvs-1.rockspec | 28 ++++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index f356cf3..c9bf206 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.30 2007/06/07 01:28:08 tomas Exp $ +# $Id: Makefile,v 1.31 2008/01/23 02:48:47 mascarenhas Exp $ T= lfs V= 1.3.0 @@ -9,15 +9,14 @@ include $(CONFIG) SRCS= src/$T.c OBJS= src/$T.o -lib: src/$(LIBNAME) +lib: src/lfs.so -src/$(LIBNAME): $(OBJS) - export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) +src/lfs.so: $(OBJS) + export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/lfs.so $(OBJS) -install: src/$(LIBNAME) +install: src/lfs.so mkdir -p $(LUA_LIBDIR) - cp src/$(LIBNAME) $(LUA_LIBDIR) - cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so + cp src/lfs.so $(LUA_LIBDIR) clean: - rm -f src/$(LIBNAME) $(OBJS) + rm -f src/lfs.so $(OBJS) diff --git a/Makefile.win b/Makefile.win index aeff54a..9e8f6fc 100644 --- a/Makefile.win +++ b/Makefile.win @@ -1,4 +1,4 @@ -# $Id: Makefile.win,v 1.6 2008/01/23 01:58:25 mascarenhas Exp $ +# $Id: Makefile.win,v 1.7 2008/01/23 02:48:47 mascarenhas Exp $ T= lfs V= 1.3.0 @@ -8,17 +8,18 @@ include config.win SRCS= src\$T.c OBJS= src\$T.obj -lib: src\$(LIBNAME) +lib: src\lfs.dll .c.obj: $(CC) /c /Fo$@ $(CFLAGS) $< -src\$(LIBNAME): $(OBJS) - link /manifest:no /dll /def:src\$T.def /out:src\$(LIBNAME) $(OBJS) $(LUA_LIB) +src\lfs.dll: $(OBJS) + link /dll /def:src\$T.def /out:src\lfs.dll $(OBJS) $(LUA_LIB) + mt -manifest src\lfs.dll.manifest -outputresource:src\lfs.dll;2 -install: src\$(LIBNAME) +install: src\lfs.dll IF NOT EXIST $(LUA_LIBDIR) mkdir $(LUA_LIBDIR) - copy src\$(LIBNAME) $(LUA_LIBDIR) + copy src\lfs.dll $(LUA_LIBDIR) clean: - del src\$(LIBNAME) $(OBJS) src\$T.lib src\$T.exp + del src\lfs.dll $(OBJS) src\$T.lib src\$T.exp diff --git a/rockspecs/luafilesystem-cvs-1.rockspec b/rockspecs/luafilesystem-cvs-1.rockspec index 253f4f1..a02d4f1 100644 --- a/rockspecs/luafilesystem-cvs-1.rockspec +++ b/rockspecs/luafilesystem-cvs-1.rockspec @@ -17,8 +17,28 @@ dependencies = { "lua >= 5.1" } build = { - type = "module", - modules = { - lfs = "src/lfs.c" - } + platforms = { + unix = { + type = "make", + build_variables = { + LIB_OPTION = "$(LIBFLAG)", + CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)", + }, + install_variables = { + LUA_LIBDIR = "$(LIBDIR)" + } + }, + win32 = { + type = "make", + build_variables = { + LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib", + CFLAGS = "$(CFLAGS) /I$(LUA_INCDIR)", + }, + install_variables = { + LUA_LIBDIR = "$(LIBDIR)", + LUA_DIR = "$(LUADIR)", + BIN_DIR = "$(BINDIR)" + } + } + } } -- cgit v1.2.3-55-g6feb