From 678626ef8207b86bab0dba4ae24ce6e4c56cdd70 Mon Sep 17 00:00:00 2001 From: KARBOWSKI Piotr Date: Sat, 8 Aug 2020 22:03:50 +0200 Subject: [PATCH] Makefile: support CXXFLAGS and LDFLAGS passed via environment --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6c380664..d98021c4 100644 --- a/Makefile +++ b/Makefile @@ -61,13 +61,14 @@ SRC = $(wildcard src/*.cpp) OBJS = $(SRC:src/%.cpp=build/%.o) DEPS = $(SRC:src/%.cpp=build/%.d) MANPAGE = mergerfs.1 -CXXFLAGS = \ +CXXFLAGS ?= ${OPT_FLAGS} +CXXFLAGS := \ + ${CXXFLAGS} \ -std=c++0x \ - $(OPT_FLAGS) \ $(STATIC_FLAGS) \ $(LTO_FLAGS) \ -Wall \ - -Wno-unused-result \ + -Wno-unused-result \ -MMD FUSE_FLAGS = \ -Ilibfuse/include \ @@ -76,9 +77,11 @@ FUSE_FLAGS = \ MFS_FLAGS = \ -DUSE_XATTR=$(USE_XATTR) \ -DUGID_USE_RWLOCK=$(UGID_USE_RWLOCK) -LDFLAGS = \ - -pthread \ - -lrt + +LDFLAGS := \ + ${LDFLAGS} \ + -pthread \ + -lrt DESTDIR = PREFIX = /usr/local