From 713f7aae197576c63df7bc666b72401f16cc7b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Studen=C3=BD?= Date: Sun, 26 Jun 2016 20:54:05 +0200 Subject: [PATCH] Updated makefile and Fuse bindings to finally support Mac --- lib/Fuse_bindings.idl | 3 ++- lib/Makefile | 20 +++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/Fuse_bindings.idl b/lib/Fuse_bindings.idl index ccee0fa..a5ab8e4 100644 --- a/lib/Fuse_bindings.idl +++ b/lib/Fuse_bindings.idl @@ -23,9 +23,10 @@ applejack@users.sf.net vincenzo_ml@yahoo.it */ - +quote(h,"#define FUSE_USE_VERSION 26") quote(h,"#include ") + typedef [abstract] void * fuse; quote(mlmli,"type fuse_operations") quote(mlmli,"type fuse_cmd") diff --git a/lib/Makefile b/lib/Makefile index d2fb2f0..072ff07 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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