Source

js-elisp / Makefile

Full commit
OCAMLOPTFLAGS += -g

# CR pszilagyi: The following compatibility settings are necessary but
# not sufficient to build an ocaml/omake/omake_server.exe (for
# example) on CentOS 6 that can be run on CentOS 5.  These take care
# of application libraries, such as libtinfo.so, but not libc.so.
#
# When using opam with a recent Jane Street system compiler
# (/janelibs/ocaml-4.00.0+jane1+with-fp, for example), these are not
# necessary.  We may want to remove these if we decide to use a
# /janelibs build as an opam system compiler.
#
# 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)
  OCAMLOPTFLAGS += $(OCAML_LIB_FLAGS)
endif
export OCAMLOPTFLAGS

default : ocaml

ocaml :
	cd ocaml; $(MAKE)

clean :
	cd ocaml; $(MAKE) clean

.PHONY : ocaml