--- Makefile.OCaml.orig 2017-12-18 12:23:54 UTC +++ Makefile.OCaml @@ -32,7 +32,11 @@ ifeq ($(shell uname),NetBSD) else ifeq ($(shell uname),NetBSD) OSARCH=NetBSD +else +ifeq ($(shell uname),FreeBSD) + OSARCH=FreeBSD endif +endif ifeq ($(shell uname),Linux) OSARCH=Linux endif @@ -240,7 +244,7 @@ OCAMLLIBS+=unix.cma str.cma bigarray.cma # File extensions will be substituted for the native code version OCAMLLIBS+=unix.cma str.cma bigarray.cma -COBJS+=osxsupport$(OBJ_EXT) pty$(OBJ_EXT) bytearray_stubs$(OBJ_EXT) +COBJS+=osxsupport$(OBJ_EXT) pty$(OBJ_EXT) bytearray_stubs$(OBJ_EXT) hash_compat$(OBJ_EXT) ######################################################################## ### User Interface setup @@ -311,6 +315,10 @@ endif -include fsmonitor/linux/Makefile src/fsmonitor/linux/Makefile endif +ifeq ($(OSARCH),FreeBSD) +-include fsmonitor/linux/Makefile src/fsmonitor/linux/Makefile +endif + ifeq ($(OSARCH),win32gnuc) -include fsmonitor/windows/Makefile src/fsmonitor/windows/Makefile endif @@ -436,7 +444,7 @@ win32rc/unison.res.lib: win32rc/unison.res %.o %.obj: %.c @echo "$(OCAMLOPT): $< ---> $@" - $(CAMLC) $(CAMLFLAGS) -ccopt $(OUTPUT_SEL)$(CWD)/$@ -c $(CWD)/$< + $(CAMLC) $(CAMLFLAGS) -ccopt $(OUTPUT_SEL)$(CWD)/$@ -c $(CFLAGS) $(CWD)/$< $(NAME)$(EXEC_EXT): $(CAMLOBJS) $(COBJS) @echo Linking $@