MSYS CLANGARM64 bit
This commit is contained in:
+36
-7
@@ -299,6 +299,18 @@ USE_DLB = Y
|
|||||||
#==========================================
|
#==========================================
|
||||||
#==========================================
|
#==========================================
|
||||||
|
|
||||||
|
ifeq "$(MSYSTEM)" "MINGW32"
|
||||||
|
arch = x86
|
||||||
|
else
|
||||||
|
arch = x64
|
||||||
|
endif
|
||||||
|
MACH := $(shell echo $$PROCESSOR_IDENTIFIER | cut -f1 -d ' ')
|
||||||
|
MACH := $(strip $(MACH))
|
||||||
|
# Print the detected architecture (for debugging)
|
||||||
|
#$(info Detected Architecture:$(MACH).)
|
||||||
|
ifeq "$(MACH)" "ARMv8"
|
||||||
|
arch=arm64
|
||||||
|
endif
|
||||||
ifdef CI_COMPILER
|
ifdef CI_COMPILER
|
||||||
cc = gcc -c
|
cc = gcc -c
|
||||||
cxx = g++ -c
|
cxx = g++ -c
|
||||||
@@ -311,16 +323,17 @@ ld = gcc
|
|||||||
endif
|
endif
|
||||||
ifeq "$(MSYSTEM)" "MINGW32"
|
ifeq "$(MSYSTEM)" "MINGW32"
|
||||||
rc = windres --target=pe-i386
|
rc = windres --target=pe-i386
|
||||||
else # MINGW64
|
else # MINGW64 or arm64
|
||||||
|
ifeq "$(arch)" "arm64"
|
||||||
|
#rc = windres --target=pe-arm64
|
||||||
|
rc = windres
|
||||||
|
else
|
||||||
rc = windres --target=pe-x86-64
|
rc = windres --target=pe-x86-64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(MSYSTEM)" "MINGW32"
|
|
||||||
arch = x86
|
|
||||||
else # MINGW64
|
|
||||||
arch = x64
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Handle user settings
|
# Handle user settings
|
||||||
#
|
#
|
||||||
@@ -414,8 +427,15 @@ $(U)lua.exe: $(OLUA)/lua.o $(LUALIB)
|
|||||||
$(LUADLL): $(ULUADLL)
|
$(LUADLL): $(ULUADLL)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
|
|
||||||
|
ifeq "$(arch)" "arm64"
|
||||||
|
lparam=-Wl,--export-all-symbols
|
||||||
|
else
|
||||||
|
lparam=-Wl,--export-all-symbols -Wl,--add-stdcall-alias
|
||||||
|
endif
|
||||||
|
|
||||||
$(ULUADLL) $(LUAIMP): $(LUAOBJS) | $(OLUA)
|
$(ULUADLL) $(LUAIMP): $(LUAOBJS) | $(OLUA)
|
||||||
$(ld) $(LDFLAGS) -fPIC -shared -Wl,--export-all-symbols -Wl,--add-stdcall-alias \
|
$(ld) $(LDFLAGS) -fPIC -shared $(lparam) \
|
||||||
-Wl,--out-implib=$(LUAIMP) $^ -o$(ULUADLL)
|
-Wl,--out-implib=$(LUAIMP) $^ -o$(ULUADLL)
|
||||||
|
|
||||||
$(LUASTATIC): $(LUAOBJS) | $(OLUA)
|
$(LUASTATIC): $(LUAOBJS) | $(OLUA)
|
||||||
@@ -1357,7 +1377,16 @@ $(ONH)/%.o: $(SRC)/%.c $(NHLUAH) | $(ONH)
|
|||||||
#==========================================
|
#==========================================
|
||||||
# package
|
# package
|
||||||
#==========================================
|
#==========================================
|
||||||
|
ifeq "$(arch)" "x64"
|
||||||
TARGET_CPU = x64
|
TARGET_CPU = x64
|
||||||
|
else
|
||||||
|
ifeq "$(arch)" "arm64"
|
||||||
|
TARGET_CPU = arm64
|
||||||
|
else
|
||||||
|
TARGET_CPU = x86
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
NHV=370
|
NHV=370
|
||||||
PKGFILES = nethackrc.template Guidebook.txt license NetHack.exe NetHack.txt \
|
PKGFILES = nethackrc.template Guidebook.txt license NetHack.exe NetHack.txt \
|
||||||
NetHackW.exe opthelp nhdat370 record symbols sysconf.template $(notdir $(LUADLL))
|
NetHackW.exe opthelp nhdat370 record symbols sysconf.template $(notdir $(LUADLL))
|
||||||
|
|||||||
Reference in New Issue
Block a user