Skip to content

Commit

Permalink
Updated makefile and Fuse bindings to finally support Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
jendas1 committed Jun 26, 2016
1 parent a9840d1 commit 713f7aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
3 changes: 2 additions & 1 deletion lib/Fuse_bindings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
applejack@users.sf.net
vincenzo_ml@yahoo.it
*/

quote(h,"#define FUSE_USE_VERSION 26")
quote(h,"#include <fuse.h>")


typedef [abstract] void * fuse;
quote(mlmli,"type fuse_operations")
quote(mlmli,"type fuse_cmd")
Expand Down
20 changes: 9 additions & 11 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ OCAMLMAKEFILE=../OCamlMakefile
SOURCES=Result.ml Unix_util.ml Unix_util_stubs.c Fuse_bindings.idl Fuse_util.c Fuse_lib.ml Fuse.ml
RESULT=Fuse
LIBS=bigarray
CLIBS=fuse
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CLIBS=osxfuse
CPPFLAGS=-I/usr/local/include/osxfuse
INCDIRS=$(shell opam config var lib)/camlidl
LIBDIRS=/usr/local/lib
else
CLIBS=fuse
endif
OCAMLLDFLAGS=-linkall
THREADS=threads
TRASH=*~ \\\#*
CFLAGS+=-D_FILE_OFFSET_BITS=64 -I. -pthread

LIBINSTALL_FILES=Fuse.a Fuse.cma Fuse.cmi Fuse.mli Fuse.cmxa Fuse_bindings.cmi Fuse_lib.cmi Unix_util.cmi dllFuse_stubs.so libFuse_stubs.a
ifeq ($(OS),Windows_NT)
#OS is windows
$(error Sorry, ocamlfuse doesn't work on Windows.)
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CPPFLAGS += -DFUSE_USE_VERSION=26 -I/usr/local/include/osxfuse
endif
endif

ifndef OCAML_LIB_INSTALL
OCAML_LIB_INSTALL=$(OCAMLLIBPATH)/site-packages/ocamlfuse
endif
Expand Down

0 comments on commit 713f7aa

Please sign in to comment.