When building Lunatic from synthesis, tell LuaJIT to generate PE object files.

BUILD_LUNATIC, third attempt.

git-svn-id: https://svn.eduke32.com/eduke32@4023 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-08-18 21:14:37 +00:00
parent f2e92a7ea3
commit 77dc57aee7
3 changed files with 11 additions and 3 deletions

View file

@ -445,14 +445,14 @@ ivfrate$(EXESUFFIX): $(OBJ)/ivfrate.$o
# Create object files directly with luajit # Create object files directly with luajit
$(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.lua $(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.lua
$(COMPILE_STATUS) $(COMPILE_STATUS)
if $(LUAJIT) -bg $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi if $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
# Same thing for defs.ilua which I'm too reluctant to rename now: # Same thing for defs.ilua which I'm too reluctant to rename now:
# NOTE: The target path must match EXACTLY with that of the DEFS_BC_SIZE # NOTE: The target path must match EXACTLY with that of the DEFS_BC_SIZE
# determination in Makefile.common, because it is embedded into the bytecode as # determination in Makefile.common, because it is embedded into the bytecode as
# debugging information. # debugging information.
$(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.ilua $(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.ilua
if $(LUAJIT) -bg $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi if $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/lunatic/%.c $(OBJ)/%.$o: $(SRC)/lunatic/%.c
$(COMPILE_STATUS) $(COMPILE_STATUS)

View file

@ -120,6 +120,9 @@ endif
# Binary suffix override: # Binary suffix override:
EXESUFFIX_OVERRIDE ?= EXESUFFIX_OVERRIDE ?=
# Are we running from synthesis?
SYNTHESIS ?= 0
# Mac OS X Frameworks location # Mac OS X Frameworks location
# Like above, use absolute paths. # Like above, use absolute paths.
APPLE_FRAMEWORKS ?=/Library/Frameworks APPLE_FRAMEWORKS ?=/Library/Frameworks
@ -446,6 +449,11 @@ endif
#### Lunatic development #### Lunatic development
# LuaJIT standalone interpreter executable: # LuaJIT standalone interpreter executable:
LUAJIT:=luajit LUAJIT:=luajit
# Options to "luajit -b" for synthesis. Since it runs on Linux, we need to tell
# the native LuaJIT to emit PE object files.
ifneq ($(SYNTHESIS),0)
LUAJIT_BCOPTS := -o windows -a x86
endif
ifneq ($(LUNATIC),0) ifneq ($(LUNATIC),0)
# FIXME: Lunatic doesn't build with inlining because of wacky include # FIXME: Lunatic doesn't build with inlining because of wacky include

View file

@ -8,7 +8,7 @@ top=/var/www/synthesis/eduke32
lockfile=$top/synthesis_building lockfile=$top/synthesis_building
source=eduke32 source=eduke32
output=/var/www/dukeworld.duke4.net/eduke32/synthesis output=/var/www/dukeworld.duke4.net/eduke32/synthesis
make=( make PLATFORM=WINDOWS CC='wine gcc' CXX='wine g++' AS='wine nasm' RC='wine windres' STRIP='wine strip' AR='wine ar' RANLIB='wine ranlib' PRETTY_OUTPUT=0 NEDMALLOC=0 ) make=( make SYNTHESIS=1 PLATFORM=WINDOWS CC='wine gcc' CXX='wine g++' AS='wine nasm' RC='wine windres' STRIP='wine strip' AR='wine ar' RANLIB='wine ranlib' PRETTY_OUTPUT=0 NEDMALLOC=0 )
clean=veryclean clean=veryclean
# the following file paths are relative to $source # the following file paths are relative to $source