aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
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
3T= luafilesystem
4
5include ./config
6
7V= 1.0a
8LIBNAME= lib$T.$V$(LIB_EXT)
9L= $T.lua
10TL= t_$T.lua
11
12SRCS= $T.c
13OBJS= $T.o
14
15
16lib: $(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
26install: $(LUA_DIR)/$L $(LIBNAME)
27 mkdir -p $(LIB_DIR)
28 cp $(LIBNAME) $(LIB_DIR)
29
30clean:
31 rm -f $L $(LIBNAME) $(OBJS)
32
33dist:
34 mkdir -p $(DIST_DIR)
35 cp config $(SRCS) $T.h $(TL) Makefile $(DIST_DIR)