diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7e0e577 --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,35 @@ | |||
1 | # $Id: Makefile,v 1.1 2004/07/27 14:15:24 tomas Exp $ | ||
2 | |||
3 | T= luafilesystem | ||
4 | |||
5 | include ./config | ||
6 | |||
7 | V= 1.0a | ||
8 | LIBNAME= lib$T.$V$(LIB_EXT) | ||
9 | L= $T.lua | ||
10 | TL= t_$T.lua | ||
11 | |||
12 | SRCS= $T.c | ||
13 | OBJS= $T.o | ||
14 | |||
15 | |||
16 | lib: $(LIBNAME) | ||
17 | |||
18 | $(LIBNAME): $(OBJS) $(TL) | ||
19 | $(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBNAME) $(OBJS) $(LIBS) | ||
20 | sed -e "s|LIB_NAME|$(LIB_DIR)/$(LIBNAME)|" $(TL) > $L | ||
21 | |||
22 | $(LUA_DIR)/$L: $L | ||
23 | mkdir -p $(LUA_DIR) | ||
24 | cp $L $(LUA_DIR) | ||
25 | |||
26 | install: $(LUA_DIR)/$L $(LIBNAME) | ||
27 | mkdir -p $(LIB_DIR) | ||
28 | cp $(LIBNAME) $(LIB_DIR) | ||
29 | |||
30 | clean: | ||
31 | rm -f $L $(LIBNAME) $(OBJS) | ||
32 | |||
33 | dist: | ||
34 | mkdir -p $(DIST_DIR) | ||
35 | cp config $(SRCS) $T.h $(TL) Makefile $(DIST_DIR) | ||