Makefile: Clean up more Lunatic setup.

git-svn-id: https://svn.eduke32.com/eduke32@6104 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-03-23 20:47:00 +00:00
parent df6871854a
commit f0b73188ed
2 changed files with 14 additions and 13 deletions

View file

@ -593,7 +593,7 @@ endif
#### Lunatic development
# LuaJIT standalone interpreter executable:
LUAJIT:=luajit
LUAJIT=luajit$(EXESUFFIX)
# Options to "luajit -b" for synthesis. Since it runs on Linux, we need to tell
# the native LuaJIT to emit PE object files.
ifeq ($(PLATFORM),WINDOWS)
@ -607,22 +607,10 @@ ifeq ($(PLATFORM),WINDOWS)
endif
ifneq ($(LUNATIC),0)
COMPILERFLAGS+= -Isource/duke3d/src/lunatic -DLUNATIC
ifneq ($(USE_LUAJIT_2_1),0)
COMPILERFLAGS+= -DUSE_LUAJIT_2_1
endif
# Determine size of _defs*.lua bytecode once.
ifndef DEFS_BC_SIZE
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h source/duke3d/src/lunatic/_defs_game.lua -)
DEFS_BC_SIZE := $(word 3, $(DEFS_BC_SIZE))
endif
ifndef DEFS_M32_BC_SIZE
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h source/duke3d/src/lunatic/_defs_editor.lua -)
DEFS_M32_BC_SIZE := $(word 3, $(DEFS_M32_BC_SIZE))
endif
COMPILERFLAGS+= -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
ifeq ($(PLATFORM),WINDOWS)
LIBS+= -lluajit
else

View file

@ -424,6 +424,19 @@ DUKE3D_EDITOR_MISCDEPS=
LUNATIC_SRC = $(DUKE3D_SRC)/lunatic
LUNATIC_LUA_PREFIX = luaJIT_BC_
ifneq (0,$(LUNATIC))
COMPILERFLAGS += -I$(LUNATIC_SRC) -DLUNATIC
# Determine size of _defs*.lua bytecode once.
ifndef DEFS_BC_SIZE
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(LUNATIC_SRC)/_defs_game.lua -)
DEFS_BC_SIZE := $(word 3, $(DEFS_BC_SIZE))
endif
ifndef DEFS_M32_BC_SIZE
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(LUNATIC_SRC)/_defs_editor.lua -)
DEFS_M32_BC_SIZE := $(word 3, $(DEFS_M32_BC_SIZE))
endif
DUKE3D_CFLAGS += -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
# Lunatic object base names. These are not used in targets directly.
LUNATIC_LUA_OBJS = \
defs_common.lua \