diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index b86869525..b281d078e 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -445,14 +445,14 @@ ivfrate$(EXESUFFIX): $(OBJ)/ivfrate.$o # Create object files directly with luajit $(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.lua $(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: # 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 # debugging information. $(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 $(COMPILE_STATUS) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 1cbe7a9b4..896fcd2f7 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -120,6 +120,9 @@ endif # Binary suffix override: EXESUFFIX_OVERRIDE ?= +# Are we running from synthesis? +SYNTHESIS ?= 0 + # Mac OS X Frameworks location # Like above, use absolute paths. APPLE_FRAMEWORKS ?=/Library/Frameworks @@ -446,6 +449,11 @@ endif #### Lunatic development # LuaJIT standalone interpreter executable: 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) # FIXME: Lunatic doesn't build with inlining because of wacky include diff --git a/polymer/synthesis.sh b/polymer/synthesis.sh index 410ef96b9..6de5a9363 100755 --- a/polymer/synthesis.sh +++ b/polymer/synthesis.sh @@ -8,7 +8,7 @@ top=/var/www/synthesis/eduke32 lockfile=$top/synthesis_building source=eduke32 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 # the following file paths are relative to $source