From 3c8570ac52848544b33c805a764fbd00f244958e Mon Sep 17 00:00:00 2001 From: human Date: Sun, 3 Jan 2021 12:23:20 +0200 Subject: multi-threaded tabfs.c --- fs/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'fs/Makefile') diff --git a/fs/Makefile b/fs/Makefile index 97ca01a..37f0f3d 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -7,25 +7,26 @@ OSXFUSE_ROOT = /usr/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 +CFLAGS ?= -O2 +CFLAGS_EXTRA = -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-unused-result -g ifeq ($(shell uname -s),Linux) CFLAGS += $(CFLAGS_EXTRA) - LIBS = -lfuse + LIBS = -lfuse -pthread 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) + 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 + LIBS = -lfuse -pthread endif all: $(TARGETS) tabfs: tabfs.c - cc $(CFLAGS) -o $@ $^ $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) clean: rm -f $(TARGETS) *.o @@ -34,3 +35,4 @@ clean: unmount: killall -9 tabfs || true diskutil unmount force mnt || true + fusermount -u mnt || true -- cgit v1.2.3 From 5905852cef957c4e0aa2f40721824f1d063a0d51 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Mon, 4 Jan 2021 04:50:24 -0800 Subject: use -lfuse on Mac. fixes #11. fixes #20 --- fs/Makefile | 4 ++-- tabfs.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'fs/Makefile') diff --git a/fs/Makefile b/fs/Makefile index 37f0f3d..658adb7 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -15,8 +15,8 @@ ifeq ($(shell uname -s),Linux) LIBS = -lfuse -pthread 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 + CFLAGS += -I$(OSXFUSE_ROOT)/include -L$(OSXFUSE_ROOT)/lib -D_DARWIN_USE_64_BIT_INODE $(CFLAGS_EXTRA) + LIBS = -lfuse endif ifeq ($(shell uname -s),FreeBSD) CFLAGS += -L$(FREEBSD_ROOT)/lib -I$(FREEBSD_ROOT)/include $(CFLAGS_EXTRA) diff --git a/tabfs.md b/tabfs.md index 9224980..230d04b 100644 --- a/tabfs.md +++ b/tabfs.md @@ -352,10 +352,10 @@ Choose manifest.json in the extension subfolder of this repo. ### 2. Install the C filesystem First, make sure you have FUSE and FUSE headers. On Linux, for example, -`sudo apt install libfuse-dev` or equivalent. On macOS, get [FUSE for -macOS](https://osxfuse.github.io/). (on macOS, also check [this -bug](https://github.com/osnr/TabFS/issues/11) -- TODO work out the -best path to explain here.) +`sudo apt install libfuse-dev` or equivalent. On macOS, get +[macFUSE](https://osxfuse.github.io/). (on macOS, also see [this +-bug](https://github.com/osnr/TabFS/issues/11) -- TODO work out the +best path to explain here) Then compile the C filesystem: -- cgit v1.2.3