diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 7c8a710cc..b4badc991 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -411,7 +411,13 @@ $(OBJ)/%.$o: $(SRC)/%.c # Create object files directly with luajit $(OBJ)/luaJIT_BC_%.$o: $(SRC)/lunatic/%.lua $(COMPILE_STATUS) +ifeq ($(PLATFORM),DARWIN) + # LuaJIT on OS X doesn't support writing Mach-O objects as of beta-10, + # so we pipe the C source into GCC. + if $(LUAJIT) -bg -t c $< - | $(CC) -xc -c - -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi +else if $(LUAJIT) -bg $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi +endif $(OBJ)/%.$o: $(SRC)/lunatic/%.c $(COMPILE_STATUS) diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index 79ff5c520..10966f59c 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -55,7 +55,7 @@ OURASFLAGS=$(BASEASFLAGS) OURLDFLAGS=$(BASELDFLAGS) $(BUILDLDFLAGS) ifneq ($(LUNATIC),0) - OURCFLAGS+= -DLUNATIC_ENABLE + OURCFLAGS+= -DLUNATIC endif UTILLIBS= -lm # -lpthread