diff options
author | Omar Rizwan <omar.rizwan@gmail.com> | 2020-10-23 22:47:59 -0700 |
---|---|---|
committer | Omar Rizwan <omar.rizwan@gmail.com> | 2020-10-23 22:50:59 -0700 |
commit | 2426e9f7a5aa7989573151270fa090b4c93ad53c (patch) | |
tree | 9edbcb72a01f717f864890001c702f87cbea269a /fs/Makefile | |
parent | 281e0a3d8cbc4ef5e2f2a32d6e347888d36c5209 (diff) |
Tweak README and Makefile for new deps, Linux support.
Diffstat (limited to 'fs/Makefile')
-rw-r--r-- | fs/Makefile | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/fs/Makefile b/fs/Makefile index f393c20..e3b6477 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -4,24 +4,21 @@ TARGETS = tabfs OSXFUSE_ROOT = /usr/local #OSXFUSE_ROOT = /opt/local -INCLUDE_DIR = $(OSXFUSE_ROOT)/include/osxfuse/fuse -LIBRARY_DIR = $(OSXFUSE_ROOT)/lib +CFLAGS_EXTRA = -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -Wall -Wno-unused-function -g -CC ?= gcc - -CFLAGS_OSXFUSE = -I$(INCLUDE_DIR) -L$(LIBRARY_DIR) -CFLAGS_OSXFUSE += -DFUSE_USE_VERSION=26 -CFLAGS_OSXFUSE += -D_FILE_OFFSET_BITS=64 -CFLAGS_OSXFUSE += -D_DARWIN_USE_64_BIT_INODE - -CFLAGS_EXTRA = -Wall -Wno-unused-function -g $(CFLAGS) - -LIBS = -losxfuse +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 all: $(TARGETS) tabfs: tabfs.c - $(CC) $(CFLAGS_OSXFUSE) $(CFLAGS_EXTRA) -o $@ $^ $(LIBS) + cc $(CFLAGS) -o $@ $^ $(LIBS) clean: rm -f $(TARGETS) *.o @@ -30,9 +27,3 @@ clean: unmount: killall -9 tabfs || true diskutil unmount force mnt || true - -mount: tabfs - ./tabfs -odirect_io -s -f mnt - -debugmount: tabfs - lldb -- ./tabfs -odirect_io -s -f mnt |