From 414292575b892eaa4c163e7ad1ef95e1dfa61195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fern=C3=A1ndez?= Date: Wed, 1 May 2024 20:23:57 +0000 Subject: [PATCH] generic linux package --- Makefile | 2 +- Makefile.defs | 45 +++++++++++++++++++++------------------------ 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index ca1885765..bc32dbef7 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ include Makefile.defs .NOTPARALLEL: DO_STRIP := $(if $(or $(EMULATE_READER),$(KODEBUG)),,1) -DO_STRIP := $(if $(or $(DO_STRIP),$(APPIMAGE),$(DEBIAN)),1,) +DO_STRIP := $(if $(or $(DO_STRIP),$(APPIMAGE),$(LINUX)),1,) $(info ************ Building for MACHINE: "$(MACHINE)" **********) $(info ************ PATH: "$(PATH)" **********) diff --git a/Makefile.defs b/Makefile.defs index fa42b2814..ee097367f 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -58,6 +58,8 @@ else export NDKABI?=18 endif +LINUX_ARCH?=native + # Detect LuaRocks 3 LR_VER_NUM := $(shell luarocks --version | grep -Eo '[0-9]+.[0-9]+') LR_GT_3_0 := $(shell awk -v LR_VER_NUM=$(LR_VER_NUM) 'BEGIN { print (LR_VER_NUM >= 3.0); }') @@ -165,22 +167,18 @@ else ifeq ($(TARGET), appimage) export EMULATE_READER=1 export SDL=1 export APPIMAGE=1 -else ifeq ($(TARGET), debian) - export SDL=1 - export DEBIAN=1 - export EMULATE_READER=1 -else ifeq ($(TARGET), debian-armel) - CHOST?=arm-linux-gnueabi +else ifeq ($(TARGET), linux) export SDL=1 - export DEBIAN_CROSS=1 -else ifeq ($(TARGET), debian-armhf) - CHOST?=arm-linux-gnueabihf - export SDL=1 - export DEBIAN_CROSS=1 -else ifeq ($(TARGET), debian-arm64) - CHOST?=aarch64-linux-gnu - export SDL=1 - export DEBIAN_CROSS=1 + ifeq ($(LINUX_ARCH), arm) + CHOST?=arm-linux-gnueabihf + export LINUX_CROSS=1 + else ifeq ($(LINUX_ARCH), arm64) + CHOST?=aarch64-linux-gnu + export LINUX_CROSS=1 + else + export LINUX=1 + export EMULATE_READER=1 + endif else ifeq ($(TARGET), macos) export SDL=1 export MACOS=1 @@ -524,14 +522,13 @@ else ifeq ($(TARGET), arm-generic) # Defaults to generic crap ARM_ARCH:=$(ARMV6_GENERIC_ARCH) ARM_ARCH+=-mfloat-abi=softfp -else ifeq ($(TARGET), debian-armel) - ARM_ARCH:=$(ARMV7_GENERIC_ARCH) - ARM_ARCH+=-mfloat-abi=softfp -else ifeq ($(TARGET), debian-armhf) - ARM_ARCH:=$(ARMV7_GENERIC_ARCH) - ARM_ARCH+=-mfloat-abi=hard -else ifeq ($(TARGET), debian-arm64) - ARM_ARCH:=$(ARM64_GENERIC_ARCH) +else ifeq ($(TARGET), linux) + ifeq ($(LINUX_ARCH), arm) + ARM_ARCH:=$(ARMV7_GENERIC_ARCH) + ARM_ARCH+=-mfloat-abi=hard + else ifeq ($(LINUX_ARCH), arm64) + ARM_ARCH:=$(ARM64_GENERIC_ARCH) + endif else # else, we are compiling emulator on x86 ARM_ARCH:= @@ -543,7 +540,7 @@ ifdef APPIMAGE HOST_ARCH:=-mtune=generic -march=x86-64 endif -ifdef DEBIAN +ifdef LINUX HOST_ARCH:=-mtune=generic endif