Skip to content

Commit

Permalink
Makefile: support CXXFLAGS and LDFLAGS passed via environment
Browse files Browse the repository at this point in the history
  • Loading branch information
KARBOWSKI Piotr committed Aug 8, 2020
1 parent 0bc6711 commit 678626e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 678626e

Please sign in to comment.