mirror of
https://github.com/osnr/TabFS.git
synced 2024-06-08 08:52:20 +02:00
37 lines
832 B
Makefile
37 lines
832 B
Makefile
TARGETS = tabfs
|
|
|
|
# Root for OSXFUSE includes and libraries
|
|
OSXFUSE_ROOT = /usr/local
|
|
#OSXFUSE_ROOT = /opt/local
|
|
|
|
# Root for libraries from FreeBSD's ports
|
|
FREEBSD_ROOT = /usr/local
|
|
|
|
CFLAGS_EXTRA = -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -Wall -Wno-unused-function -g
|
|
|
|
ifeq ($(shell uname -s),Linux)
|
|
CFLAGS += $(CFLAGS_EXTRA)
|
|
LIBS = -lfuse
|
|
endif
|
|
ifeq ($(shell uname -s),Darwin)
|
|
CFLAGS = -I$(OSXFUSE_ROOT)/include/osxfuse/fuse -L$(OSXFUSE_ROOT)/lib -D_DARWIN_USE_64_BIT_INODE $(CFLAGS_EXTRA)
|
|
LIBS = -losxfuse
|
|
endif
|
|
ifeq ($(shell uname -s),FreeBSD)
|
|
CFLAGS += -L$(FREEBSD_ROOT)/lib -I$(FREEBSD_ROOT)/include $(CFLAGS_EXTRA)
|
|
LIBS = -lfuse
|
|
endif
|
|
|
|
all: $(TARGETS)
|
|
|
|
tabfs: tabfs.c
|
|
cc $(CFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
clean:
|
|
rm -f $(TARGETS) *.o
|
|
rm -rf *.dSYM
|
|
|
|
unmount:
|
|
killall -9 tabfs || true
|
|
diskutil unmount force mnt || true
|