summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2010-12-05 14:31:02 (GMT)
committerTony Theodore <tonyt@logyst.com>2010-12-05 14:31:02 (GMT)
commit2405db709fd065d64af5a6d1522c449b8ffc8cbf (patch)
treecc93404ff07339b5297bd006aa95ca159bb538a7 /src
parente059b0742797c920a50444c6559514aae1316185 (diff)
downloadmxe-2405db709fd065d64af5a6d1522c449b8ffc8cbf.zip
mxe-2405db709fd065d64af5a6d1522c449b8ffc8cbf.tar.gz
mxe-2405db709fd065d64af5a6d1522c449b8ffc8cbf.tar.bz2
add test program for lua
Diffstat (limited to 'src')
-rw-r--r--src/lua-test.c15
-rw-r--r--src/lua.mk5
2 files changed, 20 insertions, 0 deletions
diff --git a/src/lua-test.c b/src/lua-test.c
new file mode 100644
index 0000000..f6f208f
--- /dev/null
+++ b/src/lua-test.c
@@ -0,0 +1,15 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#include <stdio.h>
+#include <lua.h>
+#include <lauxlib.h>
+
+int main (int argc, char **argv) {
+ (void)argc;
+ (void)argv;
+
+ lua_State *L = lua_open();
+ lua_close(L);
+ return 0;
+}
diff --git a/src/lua.mk b/src/lua.mk
index e21a16f..3e156fa 100644
--- a/src/lua.mk
+++ b/src/lua.mk
@@ -32,4 +32,9 @@ define $(PKG)_BUILD
RANLIB='$(TARGET)-ranlib' \
INSTALL='$(INSTALL)' \
install ranlib
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -std=c99 -pedantic \
+ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-lua.exe' \
+ -llua
endef