Makefile fixes for MacOS. It builds on my machine™ now. :-D

pull/2/head
roker 2021-05-19 16:44:28 +02:00
parent fd6ce1f635
commit 3a611abb69
1 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,6 @@ CFLAGS+=-std=c14 -fvisibility=hidden
CXXFLAGS+= -I$(PEP_INCLUDE) -std=c++14 -fvisibility=hidden
LDFLAGS+=-std=c++14 -L$(PEP_LIB_PATH) -L$(LIBRARY_PATH)
LDLIBS+= -lpEpEngine -lpEpAdapter -lpEpwebserver -lasn1 \
-lboost_filesystem -lboost_program_options -lboost_system -lboost_thread -lboost_regex \
-lsequoia_openpgp_ffi -lhogweed -lnettle -lgmp \
-lz -lsqlite3
@ -35,14 +34,19 @@ BUILD_FOR=$(BUILD_ON)
ifeq ($(BUILD_ON),Darwin)
ifeq ($(BUILD_FOR),Darwin)
LDLIBS+= -liconv -lobjc -framework Foundation -framework Security
LDLIBS+= -lboost_filesystem-mt -lboost_program_options-mt -lboost_system-mt -lboost_thread-mt -lboost_regex-mt
# ASAN is not strictly a MacOS/clang feature, but won't work with musl.
CXXFLAGS+= -fsanitize=address
LDFLAGS+= -fsanitize=address
else
$(error I do not know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif
else ifeq ($(BUILD_ON),Linux)
ifeq ($(BUILD_FOR),Linux)
LDLIBS+= -luuid
LDLIBS+= -luuid \
-lboost_filesystem -lboost_program_options -lboost_system -lboost_thread -lboost_regex
else
$(error I do not know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif