mirror of
https://github.com/torarnv/sparsebundlefs.git
synced 2026-03-03 18:28:07 +01:00
The source file has to come first, so that the linker will know which symbols to include from the fuse library (instead of throwing them away).
23 lines
571 B
Makefile
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) $< -o $@ $(CFLAGS) $(FUSE_FLAGS) $(LFLAGS) $(DEFINES)
|
|
|
|
all: $(TARGET)
|
|
|
|
clean:
|
|
rm -f $(TARGET)
|