Skip to content
New issue

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

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

Already on GitHub? # to your account

extrald flags for arch #55

Merged
merged 2 commits into from
Apr 28, 2024
Merged
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
10 changes: 9 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Detect if the distro is arch based
ARCH_CHECK := $(shell grep -q 'arch' /etc/os-release && echo "true" || echo "false")

# Set extra linker flags for Arch Linux
ifeq ($(ARCH_CHECK),true)
EXTRA_LDFLAGS := -labsl_log_internal_check_op -labsl_log_internal_message
endif

PROTO_DIR = protos
PROTO_FILES = $(wildcard $(PROTO_DIR)/*.proto)
PROTO_CPP_FILES = $(patsubst %.proto, %.pb.cc, $(PROTO_FILES))
Expand All @@ -15,7 +23,7 @@ all: FLAGS+=-O3 -g
all: include/protos/api.pb.h matrix trampoline build/diagnosis

matrix: $(ALL_OBJECTS)
g++ -std=c++20 $(FLAGS) -g -o matrix $(ALL_OBJECTS) $(LIBS) $(INCLUDES)
g++ -std=c++20 $(FLAGS) -g -o matrix $(ALL_OBJECTS) $(LIBS) $(EXTRA_LDFLAGS) $(INCLUDES)

trampoline: src/trampoline.cpp build/x-raise
g++ -o trampoline src/trampoline.cpp
Expand Down