From a674394fa26c5f65d8f1247188707a8264a5c230 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 6 May 2018 10:27:55 -0400 Subject: [PATCH] fix up makefile --- contrib/backends/nntpchan-daemon/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/contrib/backends/nntpchan-daemon/Makefile b/contrib/backends/nntpchan-daemon/Makefile index e80e2e1..4dd3300 100644 --- a/contrib/backends/nntpchan-daemon/Makefile +++ b/contrib/backends/nntpchan-daemon/Makefile @@ -21,16 +21,20 @@ TEST = $(REPO)/test DAEMON_SRC = $(REPO)/daemon +LD_FLAGS ?= + +INC_FLAGS = -I$(HEADERS_PATH) + ifeq ($(shell uname -s),"FreeBSD") - SODIUM_INC = /usr/local/include - SODIUM_LIB = /usr/local/lib/libsodium.a + LD_FLAGS += -lc++fs + INC_FLAGS += /usr/local/include + LD_FLAGS += /usr/local/lib/libsodium.a else - SODIUM_INC = $(shell pkg-config --cflags libsodium) - SODIUM_LIB = $(shell pkg-config --libs --static libsodium) + LD_FLAGS += -lstdc++fs + INC_FLAGS += $(shell pkg-config --cflags libsodium) + LD_FLAGS += $(shell pkg-config --libs --static libsodium) endif -LD_FLAGS := -lstdc++fs $(SODIUM_LIB) -INC_FLAGS := -I$(HEADERS_PATH) $(SODIUM_INC) REQUIRED_CXXFLAGS = -std=c++17 -Wall -Wextra -Werror -pedantic $(INC_FLAGS) DEBUG = 1