Commits

seanmcl  committed c22cbb2 Merge

merge

  • Participants
  • Parent commits 8eea99f, 301a080

Comments (0)

Files changed (1)

File ocaml/omake/Makefile

 	-package core -package core_extended -package async -package pcre \
 	-I $(INOTIFY_DIR) inotify.cmxa
 
+# Jane-specific CentOS 5 build compatibility based on jane/trunk/OMakeroot:
+REDHAT_RELEASE = $(shell \
+  test -f /etc/redhat-release \
+   && cat /etc/redhat-release)
+REDHAT_VERSION = $(strip \
+  $(if $(findstring CentOS release 5,$(REDHAT_RELEASE)),5,\
+  $(if $(findstring CentOS release 6,$(REDHAT_RELEASE)),6)))
+C5COMPATROOT = /usr/jane
+C5_COMPAT_ROOT_DIRS = \
+  $(C5COMPATROOT)/lib64 \
+  $(C5COMPATROOT)/usr/lib64 \
+  $(C5COMPATROOT)/usr/lib64/mysql
+OCAML_LIB_FLAGS = $(foreach d,$(C5_COMPAT_ROOT_DIRS),\
+  -ccopt -Xlinker \
+  -ccopt -rpath \
+  -ccopt -Xlinker \
+  -ccopt $(d))
+ifeq ($(REDHAT_VERSION),6)
+  OCAMLOPT += $(OCAML_LIB_FLAGS)
+endif
+
 FILES=          \
 process         \
 omake_inotify   \