More native compile fixes
* subst doesn't seem to work in variable assignments * LUADLL isn't meaningful for MS-DOS
This commit is contained in:
@@ -40,9 +40,9 @@ GAMEDIR =../binary
|
|||||||
|
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
ifeq "$(LUA_VERSION)" "5.3.5"
|
ifeq "$(LUA_VERSION)" "5.3.5"
|
||||||
LUAVER=5.3.5
|
LUAVER=535
|
||||||
else
|
else
|
||||||
LUAVER=5.4.4
|
LUAVER=544
|
||||||
endif
|
endif
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
# Location of LUA
|
# Location of LUA
|
||||||
@@ -56,7 +56,7 @@ endif
|
|||||||
# successfully build NetHack-3.7.
|
# successfully build NetHack-3.7.
|
||||||
#
|
#
|
||||||
ADD_LUA=Y
|
ADD_LUA=Y
|
||||||
LUATOP=../lib/lua$(subst .,, $(LUAVER))
|
LUATOP=../lib/lua$(LUAVER)
|
||||||
#
|
#
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# This marks the end of the BUILD DECISIONS section.
|
# This marks the end of the BUILD DECISIONS section.
|
||||||
@@ -310,11 +310,10 @@ ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ)
|
|||||||
#=================================================================
|
#=================================================================
|
||||||
|
|
||||||
LUASRC = $(LUATOP)/src
|
LUASRC = $(LUATOP)/src
|
||||||
LUALIB = $(O)lua$(subst .,, $(LUAVER))s.a
|
LUALIB = $(O)lua$(LUAVER)s.a
|
||||||
LUADLL = $(O)lua$(subst .,, $(LUAVER)).a
|
|
||||||
LUAINCL = -I$(LUASRC)
|
LUAINCL = -I$(LUASRC)
|
||||||
#LUAFLAGS = unix added -lm here?
|
#LUAFLAGS = unix added -lm here?
|
||||||
LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB)
|
LUATARGETS = lua.exe luac.exe $(LUALIB)
|
||||||
|
|
||||||
LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \
|
LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \
|
||||||
lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \
|
lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \
|
||||||
@@ -890,16 +889,12 @@ $(O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H)
|
|||||||
#=============================================================
|
#=============================================================
|
||||||
|
|
||||||
lua.exe: $(O)lua.o $(LUALIB)
|
lua.exe: $(O)lua.o $(LUALIB)
|
||||||
$(link) $(LFLAGS) -o$@ $(O)lua.o $(LUALIB)
|
$(CC) $(LFLAGS) -o$@ $(O)lua.o $(LUALIB)
|
||||||
|
|
||||||
luac.exe: $(O)luac.o $(O)lua$(subst .,, $(LUAVER))s.a
|
luac.exe: $(O)luac.o $(O)lua$(LUAVER)s.a
|
||||||
$(link) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB)
|
$(CC) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB)
|
||||||
|
|
||||||
$(O)lua$(subst .,, $(LUAVER)).a: $(LUAOBJFILES)
|
$(O)lua$(LUAVER)s.a: $(LUAOBJFILES)
|
||||||
$(cc) -shared -Wl,--export-all-symbols \
|
|
||||||
-Wl,--add-stdcall-alias -o $@ $<
|
|
||||||
|
|
||||||
$(O)lua$(subst .,, $(LUAVER))s.a: $(LUAOBJFILES)
|
|
||||||
ar rcS $@ $(LUAOBJFILES1)
|
ar rcS $@ $(LUAOBJFILES1)
|
||||||
ar rcS $@ $(LUAOBJFILES2)
|
ar rcS $@ $(LUAOBJFILES2)
|
||||||
ar rcs $@ $(LUAOBJFILES3)
|
ar rcs $@ $(LUAOBJFILES3)
|
||||||
|
|||||||
Reference in New Issue
Block a user