Skip to content
Snippets Groups Projects
Commit 12569e6d authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use uname -m for any arch genwrap doesn't know about.

parent 99b915af
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4130 passed
......@@ -220,36 +220,37 @@ ifneq ($(os),win32)
endif
endif
machine := $(shell if uname -m | egrep -v "(i[3456789]*|x)86" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; fi)
machine := $(shell if uname -m | egrep "64" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; else echo $(machine) ; fi)
machine_uname := $(shell if uname -m | egrep -v "(i[3456789]*|x)86" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; fi)
machine_uname := $(shell if uname -m | egrep "64" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; else echo $(machine_uname) ; fi)
ifeq ($(os),darwin)
ifeq ("$(machine)","")
ifeq ("$(machine_uname)","")
ifeq ($(shell sysctl hw.optional.x86_64),hw.optional.x86_64: 1)
machine := x86_64
machine_uname := x86_64
endif
endif
endif
ifeq ($(machine),x86_64)
machine := x64
ifeq ($(machine_uname),x86_64)
machine_uname := x64
endif
CFLAGS += -fpic
ifeq ($(machine),sparc64)
ifeq ($(machine_uname),sparc64)
CFLAGS += -D__BIG_ENDIAN__
endif
ifeq ($(machine),sun4u)
ifeq ($(machine_uname),sun4u)
CFLAGS += -D__BIG_ENDIAN__
endif
ifeq ($(machine),power_macintosh)
ifeq ($(machine_uname),power_macintosh)
CFLAGS += -D__BIG_ENDIAN__
endif
ifeq ($(machine),mac68k)
ifeq ($(machine_uname),mac68k)
CFLAGS += -D__BIG_ENDIAN__
endif
ifeq ($(machine),)
ifeq ($(machine_uname),)
machine := $(os)
else
machine := $(os).$(machine)
machine := $(os).$(machine_uname)
CFLAGS += -DUNAME_ARCHITECTURE_DESC=$(machine_uname)
endif
ifeq ($(shell if [ -f /usr/include/inttypes.h ] ; then echo YES ; fi),YES)
......
......@@ -15,6 +15,7 @@ On Windows, indicate "awareness" for "High DPI"
Prefer X11 mode over SDL mode
Fix scrolling with left/right margins
Resumed ZModem ETA estimation fix
Support PPM graphics
Version 1.1
-----------
......
......@@ -203,7 +203,11 @@ extern "C" {
#elif defined(_M_IA64) || defined(__ia64__)
#define ARCHITECTURE_DESC "ia64"
#else
#error "Need to describe target architecture"
#ifdef UNAME_ARCHITECTURE_DESC
#define ARCHITECTURE_DESC UNAME_ARCHITECTURE_DESC
#else
#error "Need to describe target architecture"
#endif
#endif
/*********************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment