summaryrefslogtreecommitdiff
path: root/tolua
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2014-10-14 10:58:50 +0200
committerAndreas Baumann <abaumann@yahoo.com>2014-10-14 10:58:50 +0200
commit0b3f1a0e088575988beaaea11b3e32a0bd26f63a (patch)
tree6d19a10e4280d127e06409be785faa9e5450ec9a /tolua
parentc53b92a2da701e0ae8c0263ab92344dd418558c2 (diff)
downloadcrawler-0b3f1a0e088575988beaaea11b3e32a0bd26f63a.tar.gz
crawler-0b3f1a0e088575988beaaea11b3e32a0bd26f63a.tar.bz2
tolua test runs on Windows
Diffstat (limited to 'tolua')
-rw-r--r--tolua/src/bin/Makefile.W3259
1 files changed, 59 insertions, 0 deletions
diff --git a/tolua/src/bin/Makefile.W32 b/tolua/src/bin/Makefile.W32
new file mode 100644
index 0000000..8511146
--- /dev/null
+++ b/tolua/src/bin/Makefile.W32
@@ -0,0 +1,59 @@
+# makefile for tolua executable
+
+LINK= link.exe
+CC= cl.exe
+INCLUDE_DIRS=/I$(TOLUA)\include /I$(TOLUA)\..\lua\src
+COMMON_CFLAGS= /W2 /WX /nologo /O2 /EHsc /c $(INCLUDE_DIRS)
+
+!IFDEF DEBUG
+CFLAGS= /MDd /Zi $(COMMON_CFLAGS)
+!ELSE
+CFLAGS= /MD $(COMMON_CFLAGS)
+!ENDIF
+
+LIBS= \
+ $(TOLUA)\lib\tolua.lib \
+ $(TOLUA)\..\lua\src\lua52.lib
+
+.SUFFIXES: .c .obj
+
+.c.obj:
+ $(CC) $(CFLAGS) /Fo$@ $<
+
+!IFDEF DEBUG
+CFLAGS= /MDd /Zi $(COMMON_CFLAGS)
+LDFLAGS = /nologo /manifest /debug
+!ELSE
+CFLAGS= /MD $(COMMON_CFLAGS)
+LDFLAGS = /nologo /manifest
+!ENDIF
+
+TOLUA=..\..
+
+OBJS= \
+ tolua.obj \
+ toluabind.obj
+
+OBJS_D= \
+ tolua_lua.obj
+
+T= $(TOLUA)\bin\tolua.exe
+T_D = $(TOLUA)\bin\tolua_lua.exe
+
+all: $(T)
+
+$(T): $(OBJS)
+ $(LINK) $(LDFLAGS) /nologo /out:$@ $(OBJS) $(LIBS)
+
+toluabind.c: $(T_D)
+ copy $(TOLUA)\..\lua\src\lua52.dll $(TOLUA)\bin
+ $(T_D) -o toluabind.c tolua.pkg
+
+$(T_D): $(OBJS_D)
+ $(LINK) $(LDFLAGS) /nologo /out:$@ $(OBJS_D) $(LIBS)
+
+tolua_lua.obj: tolua.c
+ $(CC) /c /DLUA_SOURCE $(CFLAGS) /Fo$@ $?
+
+clean:
+ @-erase tolua_lua.obj $(OBJS) $(OBJS_D) $(T) $(T_D) 2>NUL