Files
sparsebundlefs-mirror/Makefile
Tor Arne Vestbø 672fd94c08 Use rpath on linux for FUSE
We should perhaps check if PKG_CONFIG_PATH has been set, which would
indicate that the FUSE libraries are in a non-default location, but
for now this is okey.
2012-09-28 14:53:48 +02:00

23 lines
571 B
Makefile

TARGET = sparsebundlefs
PKG_CONFIG = pkg-config
CFLAGS = -Wall -O2 -march=native
DEFINES = -DFUSE_USE_VERSION=26
ifeq ($(shell uname), Darwin)
# Pick up OSXFUSE, even with pkg-config from MacPorts
PKG_CONFIG := PKG_CONFIG_PATH=/usr/local/lib/pkgconfig $(PKG_CONFIG)
else ifeq ($(shell uname), Linux)
LFLAGS += -Wl,-rpath=$(shell $(PKG_CONFIG) fuse --variable=libdir)
endif
FUSE_FLAGS := $(shell $(PKG_CONFIG) fuse --cflags --libs)
$(TARGET): sparsebundlefs.cpp
$(CXX) $(CFLAGS) $(FUSE_FLAGS) $(LFLAGS) $(DEFINES) $< -o $@
all: $(TARGET)
clean:
rm -f $(TARGET)