aboutsummaryrefslogblamecommitdiff
path: root/net/unison248/files/patch-Makefile.OCaml
blob: 73ff7ac8313341681b564b4311ab817cf2ad3349 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                                               
                  
                                               










                              









                                                                                          


















                                                                                  
--- 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 $@