Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi CoopNet Support #633

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ ifeq ($(HOST_OS),Darwin)
endif
endif

ifeq ($(HOST_OS),Linux)
machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
ifneq (,$(findstring aarch64,$(machine)))
#Raspberry Pi 4-5
TARGET_RPI = 1
endif
ifneq (,$(findstring arm,$(machine)))
#Rasberry Pi zero, 2, 3, etc
TARGET_RPI = 1
endif
endif

# MXE overrides

ifeq ($(WINDOWS_BUILD),1)
Expand Down Expand Up @@ -272,8 +284,6 @@ endif
ifeq ($(TARGET_RPI),1)
$(info Compiling for Raspberry Pi)
DISCORD_SDK := 0
COOPNET := 0
machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown')

# Raspberry Pi B+, Zero, etc
ifneq (,$(findstring armv6l,$(machine)))
Expand Down Expand Up @@ -966,9 +976,9 @@ ifeq ($(COOPNET),1)
endif
else ifeq ($(TARGET_RPI),1)
ifneq (,$(findstring aarch64,$(machine)))
LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm64.a -l:libjuice.a
LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm64.a -l:libjuice-arm64.a
else
LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm.a -l:libjuice.a
LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm.a -l:libjuice-arm.a
endif
else
LDFLAGS += -Llib/coopnet/linux -l:libcoopnet.a -l:libjuice.a
Expand Down
Binary file added lib/coopnet/linux/libcoopnet-arm.a
Binary file not shown.
Binary file added lib/coopnet/linux/libcoopnet-arm64.a
Binary file not shown.
Binary file added lib/coopnet/linux/libjuice-arm.a
Binary file not shown.
Binary file added lib/coopnet/linux/libjuice-arm64.a
Binary file not shown.