Browse Source
Merge pull request #808 from slashbeast/Makefiles-support-ar-cflags-cxxflags-ldflags-from-env
Makefiles fixes: support environmental passed $AR, $CFLAGS, $CXXFLAGS and $LDFLAGS
pull/810/head
trapexit
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
18 additions and
11 deletions
-
Makefile
-
libfuse/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 |
|
|
|
|
|
@ -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 |
|
|
|
|
|
|
|