diff options
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | Makefile.win | 15 | ||||
-rw-r--r-- | rockspecs/luafilesystem-cvs-1.rockspec | 28 |
3 files changed, 39 insertions, 19 deletions
@@ -1,4 +1,4 @@ | |||
1 | # $Id: Makefile,v 1.30 2007/06/07 01:28:08 tomas Exp $ | 1 | # $Id: Makefile,v 1.31 2008/01/23 02:48:47 mascarenhas Exp $ |
2 | 2 | ||
3 | T= lfs | 3 | T= lfs |
4 | V= 1.3.0 | 4 | V= 1.3.0 |
@@ -9,15 +9,14 @@ include $(CONFIG) | |||
9 | SRCS= src/$T.c | 9 | SRCS= src/$T.c |
10 | OBJS= src/$T.o | 10 | OBJS= src/$T.o |
11 | 11 | ||
12 | lib: src/$(LIBNAME) | 12 | lib: src/lfs.so |
13 | 13 | ||
14 | src/$(LIBNAME): $(OBJS) | 14 | src/lfs.so: $(OBJS) |
15 | 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/lfs.so $(OBJS) |
16 | 16 | ||
17 | install: src/$(LIBNAME) | 17 | install: src/lfs.so |
18 | mkdir -p $(LUA_LIBDIR) | 18 | mkdir -p $(LUA_LIBDIR) |
19 | cp src/$(LIBNAME) $(LUA_LIBDIR) | 19 | cp src/lfs.so $(LUA_LIBDIR) |
20 | cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so | ||
21 | 20 | ||
22 | clean: | 21 | clean: |
23 | rm -f src/$(LIBNAME) $(OBJS) | 22 | 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 @@ | |||
1 | # $Id: Makefile.win,v 1.6 2008/01/23 01:58:25 mascarenhas Exp $ | 1 | # $Id: Makefile.win,v 1.7 2008/01/23 02:48:47 mascarenhas Exp $ |
2 | 2 | ||
3 | T= lfs | 3 | T= lfs |
4 | V= 1.3.0 | 4 | V= 1.3.0 |
@@ -8,17 +8,18 @@ include config.win | |||
8 | SRCS= src\$T.c | 8 | SRCS= src\$T.c |
9 | OBJS= src\$T.obj | 9 | OBJS= src\$T.obj |
10 | 10 | ||
11 | lib: src\$(LIBNAME) | 11 | lib: src\lfs.dll |
12 | 12 | ||
13 | .c.obj: | 13 | .c.obj: |
14 | $(CC) /c /Fo$@ $(CFLAGS) $< | 14 | $(CC) /c /Fo$@ $(CFLAGS) $< |
15 | 15 | ||
16 | src\$(LIBNAME): $(OBJS) | 16 | src\lfs.dll: $(OBJS) |
17 | link /manifest:no /dll /def:src\$T.def /out:src\$(LIBNAME) $(OBJS) $(LUA_LIB) | 17 | link /dll /def:src\$T.def /out:src\lfs.dll $(OBJS) $(LUA_LIB) |
18 | mt -manifest src\lfs.dll.manifest -outputresource:src\lfs.dll;2 | ||
18 | 19 | ||
19 | install: src\$(LIBNAME) | 20 | install: src\lfs.dll |
20 | IF NOT EXIST $(LUA_LIBDIR) mkdir $(LUA_LIBDIR) | 21 | IF NOT EXIST $(LUA_LIBDIR) mkdir $(LUA_LIBDIR) |
21 | copy src\$(LIBNAME) $(LUA_LIBDIR) | 22 | copy src\lfs.dll $(LUA_LIBDIR) |
22 | 23 | ||
23 | clean: | 24 | clean: |
24 | del src\$(LIBNAME) $(OBJS) src\$T.lib src\$T.exp | 25 | 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 = { | |||
17 | "lua >= 5.1" | 17 | "lua >= 5.1" |
18 | } | 18 | } |
19 | build = { | 19 | build = { |
20 | type = "module", | 20 | platforms = { |
21 | modules = { | 21 | unix = { |
22 | lfs = "src/lfs.c" | 22 | type = "make", |
23 | } | 23 | build_variables = { |
24 | LIB_OPTION = "$(LIBFLAG)", | ||
25 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)", | ||
26 | }, | ||
27 | install_variables = { | ||
28 | LUA_LIBDIR = "$(LIBDIR)" | ||
29 | } | ||
30 | }, | ||
31 | win32 = { | ||
32 | type = "make", | ||
33 | build_variables = { | ||
34 | LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib", | ||
35 | CFLAGS = "$(CFLAGS) /I$(LUA_INCDIR)", | ||
36 | }, | ||
37 | install_variables = { | ||
38 | LUA_LIBDIR = "$(LIBDIR)", | ||
39 | LUA_DIR = "$(LUADIR)", | ||
40 | BIN_DIR = "$(BINDIR)" | ||
41 | } | ||
42 | } | ||
43 | } | ||
24 | } | 44 | } |