summaryrefslogtreecommitdiff
path: root/tolua/src/bin/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'tolua/src/bin/GNUmakefile')
-rw-r--r--tolua/src/bin/GNUmakefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/tolua/src/bin/GNUmakefile b/tolua/src/bin/GNUmakefile
new file mode 100644
index 0000000..93daf77
--- /dev/null
+++ b/tolua/src/bin/GNUmakefile
@@ -0,0 +1,33 @@
+# makefile for tolua executable
+
+TOLUA=../..
+
+include $(TOLUA)/config
+
+OBJS= \
+ tolua.o \
+ toluabind.o
+
+OBJS_D= \
+ tolua_lua.o
+
+T= $(TOLUA)/bin/tolua
+T_D = $(TOLUA)/bin/tolua_lua
+
+all: $(T)
+
+$(T): $(OBJS)
+ $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
+
+toluabind.c: $(T_D)
+ $(T_D) -o toluabind.c tolua.pkg
+
+$(T_D): $(OBJS_D)
+ $(CC) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm
+
+tolua_lua.o: tolua.c
+ $(CC) -c -DLUA_SOURCE $(INC) -o $@ $<
+
+clean:
+ rm -f tolua_lua.o $(OBJS) $(OBJS_D) $(T) $(T_D)
+