oarray.ml \
ocollection/ograph2way.ml \
ograph_simple.ml ograph_extended.ml \
- ofullcommon.ml \
glimpse.ml parser_combinators.ml
# src from other authors, got from the web or caml hump
MPIINCLUDES=-I ../ocamlmpi -I ../../ocamlmpi -I +ocamlmpi
MPISYSLIBS=mpi.cma
-#sexplib
-MYSEXPSRC=sexp_common.ml
-SEXPINCLUDES=-I $(SEXPDIR)
-
#binprot
MYBINSRC=bin_common.ml
BININCLUDES=-I ../ocamltarzan/lib-binprot -I ../../ocamltarzan/lib-binprot
#backtrace
MYBACKTRACESRC=backtrace.ml
-BACKTRACEINCLUDES=-I $(shell ocamlc -where)
+BACKTRACEINCLUDES=-I $(shell $(OCAMLC) -where)
##############################################################################
# This flag can also be used in subdirectories so don't change its name here.
# For profiling use: -p -inline 0
-OPTFLAGS=
-#-thread
+OCAMLCFLAGS ?= -g
+OPTFLAGS ?= -g
# The OPTBIN variable is here to allow to use ocamlc.opt instead of
# ocaml, when it is available, which speeds up compilation. So
# or setenv it to ".opt" in your startup script.
OPTBIN ?= #.opt
-OCAMLCFLAGS ?= -g -dtypes
-
# The OCaml tools.
OCAMLC_CMD=$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES)
OCAMLOPT_CMD=$(OCAMLOPT) $(OPTFLAGS) $(INCLUDES)
OPTOBJS = $(SRC:.ml=.cmx)
+ifneq ($(FEATURE_OCAMLBUILD),yes)
all: $(LIB)
-all.opt: $(OPTLIB)
+all.opt:
+ @$(MAKE) $(OPTLIB) BUILD_OPT=yes
opt: all.opt
top: $(TARGET).top
clean::
rm -f $(TARGET).top
+else
+all:
+ cd .. && $(OCAMLBUILD) commons/commons.cma
+all.opt:
+ cd .. && $(OCAMLBUILD) commons/commons.cmxa
+clean::
+ cd .. && $(OCAMLBUILD) -clean
+endif
##############################################################################
# Other commons libs target
#-----------------------------------------------------------------------------
-.PHONEY: sexp.all sexp.opt
-sexp.all:
- $(MAKE) INCLUDESEXTRA="$(SEXPINCLUDES)" commons_sexp.cma
-sexp.opt:
- $(MAKE) INCLUDESEXTRA="$(SEXPINCLUDES)" commons_sexp.cmxa
-
-commons_sexp.cma: $(MYSEXPSRC:.ml=.cmo)
- $(OCAMLC_CMD) -a -o $@ $^
-
-commons_sexp.cmxa: $(MYSEXPSRC:.ml=.cmx)
- $(OCAMLOPT_CMD) -a -o $@ $^
-
binprot:
$(MAKE) INCLUDESEXTRA="$(BININCLUDES)" commons_bin.cma
binprot.opt:
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
+ifneq ($(FEATURE_OCAMLBUILD),yes)
-include .depend
endif
endif
+endif
+
+include ../Makefile.common