blob: 05166bacd874930c77870774e9e1447de7b95fd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
diff --git a/Makefile b/Makefile
index 6c38066..d98021c 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
diff --git a/libfuse/Makefile b/libfuse/Makefile
index e3001aa..2bbc45a 100644
--- a/libfuse/Makefile
+++ b/libfuse/Makefile
@@ -29,6 +29,8 @@ INSTALLBINDIR = $(DESTDIR)$(BINDIR)
INSTALLSBINDIR = $(DESTDIR)$(SBINDIR)
INSTALLMAN1DIR = $(DESTDIR)$(MAN1DIR)
+AR ?= ar
+
SRC = \
lib/buffer.c \
lib/cuse_lowlevel.c \
@@ -46,9 +48,10 @@ SRC = \
lib/mount.c
OBJS = $(SRC:lib/%.c=build/%.o)
DEPS = $(SRC:lib/%.c=build/%.d)
-
-CFLAGS = \
- $(OPT_FLAGS) \
+CFLAGS ?= \
+ $(OPT_FLAGS)
+CFLAGS := \
+ ${CFLAGS} \
-Wall \
-pipe \
-MMD
@@ -61,7 +64,8 @@ FUSE_FLAGS = \
-DFUSE_USE_VERSION=29 \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-DFUSERMOUNT_DIR=\"$(FUSERMOUNT_DIR)\"
-LDFLAGS = \
+LDFLAGS := \
+ ${LDFLAGS} \
-lrt \
-pthread
@@ -78,7 +82,7 @@ objects: build/config.h
$(MAKE) $(OBJS)
build/libfuse.a: objects
- ar rcs build/libfuse.a $(OBJS)
+ ${AR} rcs build/libfuse.a $(OBJS)
utils: mergerfs-fusermount mount.mergerfs
|