summaryrefslogtreecommitdiffstats
path: root/src/luajit.mk
blob: 1dc5b87e4a3644b6520bf94b4b8e23adcc3081e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This file is part of MXE.
# See index.html for further information.

PKG             := luajit
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 2.0.3
$(PKG)_CHECKSUM := 2db39e7d1264918c2266b0436c313fbd12da4ceb
$(PKG)_SUBDIR   := LuaJIT-$($(PKG)_VERSION)
$(PKG)_FILE     := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL      := http://luajit.org/download/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc

define $(PKG)_BUILD
    $(MAKE) -C '$(1)' -j '$(JOBS)' \
        HOST_CC='gcc -m32' CROSS='$(TARGET)-' \
        TARGET_SYS=Windows BUILDMODE=static \
        PREFIX='$(PREFIX)/$(TARGET)' \
        FILE_T=luajit.exe \
        install
endef

# 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 =