From 303cadb55d26b70f9c20697763597069a38bb9c7 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Wed, 1 Feb 2017 15:30:51 -0800 Subject: [PATCH] tst: passthrough-fuse: update Makefile to link with CYGFUSE or WinFsp-FUSE --- tst/passthrough-fuse/.gitignore | 1 + tst/passthrough-fuse/Makefile | 20 ++++++++++++++++++-- tst/passthrough-fuse/README.md | 7 +++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tst/passthrough-fuse/README.md diff --git a/tst/passthrough-fuse/.gitignore b/tst/passthrough-fuse/.gitignore index 02b56dcd..e7b44729 100644 --- a/tst/passthrough-fuse/.gitignore +++ b/tst/passthrough-fuse/.gitignore @@ -4,3 +4,4 @@ build *.vcproj.* *.vcxproj.user *.exe +*.install diff --git a/tst/passthrough-fuse/Makefile b/tst/passthrough-fuse/Makefile index 41c97570..3d403593 100644 --- a/tst/passthrough-fuse/Makefile +++ b/tst/passthrough-fuse/Makefile @@ -1,2 +1,18 @@ -passthrough-fuse: passthrough-fuse.c - gcc $^ -o $@ -g -Wall `pkg-config fuse --cflags --libs` \ No newline at end of file +usage: + @echo "make cygfuse|winfsp-fuse" 1>&2 + @echo "" 1>&2 + @echo " cygfuse Link with CYGFUSE" 1>&2 + @echo " winfsp-fuse Link with WinFsp-FUSE" 1>&2 + @exit 2 + +cygfuse: passthrough-cygfuse + +winfsp-fuse: passthrough-winfsp-fuse + +passthrough-cygfuse: passthrough-fuse.c + gcc $^ -o $@ -g -Wall `pkg-config fuse --cflags --libs` + +passthrough-winfsp-fuse: export PKG_CONFIG_PATH=$(PWD)/winfsp.install/lib +passthrough-winfsp-fuse: passthrough-fuse.c + ln -nsf "`regtool --wow32 get '/HKLM/Software/WinFsp/InstallDir' | cygpath -au -f -`" winfsp.install + gcc $^ -o $@ -g -Wall `pkg-config fuse --cflags --libs` diff --git a/tst/passthrough-fuse/README.md b/tst/passthrough-fuse/README.md new file mode 100644 index 00000000..e7f43f27 --- /dev/null +++ b/tst/passthrough-fuse/README.md @@ -0,0 +1,7 @@ +`Passthrough-fuse` is a simple FUSE file system that passes all file system operations to an underlying file system. + +It can be built with the following tools: + +- Using Visual Studio (`winfsp.sln`). +- Using Cygwin GCC and linking directly with the WinFsp DLL (`make winfsp-fuse`). +- Using Cygwin GCC and linking to CYGFUSE (`make cygfuse`).