summaryrefslogtreecommitdiffstats
path: root/src/luajit.mk
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-09-30 02:55:28 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-10-01 00:26:50 (GMT)
commit6eefed63137e726a4a647ebe98be42795dafac85 (patch)
treebca2597e316a0c6bd314946a319b7375c28f3fb9 /src/luajit.mk
parent2083aa49b79782d5b9f539506ebed6121d7239c5 (diff)
downloadmxe-6eefed63137e726a4a647ebe98be42795dafac85.zip
mxe-6eefed63137e726a4a647ebe98be42795dafac85.tar.gz
mxe-6eefed63137e726a4a647ebe98be42795dafac85.tar.bz2
luajit: support 64-bit
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/luajit.mk')
-rw-r--r--src/luajit.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/luajit.mk b/src/luajit.mk
index 330336c..1dc5b87 100644
--- a/src/luajit.mk
+++ b/src/luajit.mk
@@ -12,13 +12,19 @@ $(PKG)_DEPS := gcc
define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)' \
- HOST_CC="gcc -m32" CROSS=$(TARGET)- \
+ HOST_CC='gcc -m32' CROSS='$(TARGET)-' \
TARGET_SYS=Windows BUILDMODE=static \
PREFIX='$(PREFIX)/$(TARGET)' \
FILE_T=luajit.exe \
install
endef
-$(PKG)_BUILD_x86_64-w64-mingw32 =
+# gcc -m64 is only available on 64-bit machines
+ifneq (,$(findstring 64,$(BUILD)))
+ $(PKG)_BUILD_x86_64-w64-mingw32 = \
+ $(subst 'gcc -m32','gcc -m64',$($(PKG)_BUILD))
+else
+ $(PKG)_BUILD_x86_64-w64-mingw32 =
+endif
$(PKG)_BUILD_SHARED =