Skip to content

Commit

Permalink
generic linux package
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos committed May 1, 2024
1 parent c440af0 commit 4142925
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)" **********)
Expand Down
45 changes: 21 additions & 24 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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); }')
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:=
Expand All @@ -543,7 +540,7 @@ ifdef APPIMAGE
HOST_ARCH:=-mtune=generic -march=x86-64
endif

ifdef DEBIAN
ifdef LINUX
HOST_ARCH:=-mtune=generic
endif

Expand Down

0 comments on commit 4142925

Please sign in to comment.