Skip to content

Commit

Permalink
wip: generic linux package
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos committed Jul 19, 2022
1 parent e3e0e3f commit 5402533
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
@@ -1,7 +1,7 @@
include Makefile.defs

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 @@ -18,6 +18,8 @@ ANDROID_TOOLCHAIN=$(TOOLCHAIN_DIR)/android-toolchain-$(ANDROID_ARCH)
NDK?=$(TOOLCHAIN_DIR)/android-ndk-r15c
NDKABI?=14

LINUX_ARCH?=native

# Detect LuaRocks 3
LR_VER_NUM := $(shell luarocks --version | grep -o [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 @@ -110,22 +112,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 @@ -441,14 +439,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 @@ -460,7 +457,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 5402533

Please sign in to comment.