2011-10-20 18:06:23 +02:00
|
|
|
include ../config
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2014-10-22 17:42:57 +02:00
|
|
|
BIN:=$(COMPILER)
|
2014-10-21 15:24:48 +02:00
|
|
|
|
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
2014-10-22 17:42:57 +02:00
|
|
|
BIN:=$(BIN) $(SIMULATOR)
|
2014-10-21 15:24:48 +02:00
|
|
|
endif
|
|
|
|
|
2014-10-22 17:42:57 +02:00
|
|
|
ifeq ($(ENABLE_CTRL2EPT_TRANSLATOR), yes)
|
|
|
|
BIN:=$(BIN) $(CTRLNBAC2EPT_TRANSLATOR)
|
2011-10-20 18:06:23 +02:00
|
|
|
endif
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2012-03-05 20:01:02 +01:00
|
|
|
.PHONY: all clean native byte clean debug install
|
2010-06-15 10:49:03 +02:00
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
2012-03-05 20:01:02 +01:00
|
|
|
native:
|
2014-10-22 17:42:57 +02:00
|
|
|
$(OCAMLBUILD) $(addsuffix .native,$(BIN))
|
2011-10-20 18:06:23 +02:00
|
|
|
|
2011-07-27 09:12:09 +02:00
|
|
|
byte:
|
2014-10-22 17:42:57 +02:00
|
|
|
$(OCAMLBUILD) $(addsuffix .byte,$(BIN))
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2011-07-27 09:12:09 +02:00
|
|
|
debug:
|
2014-10-22 17:42:57 +02:00
|
|
|
$(OCAMLBUILD) $(addsuffix .d.byte,$(BIN))
|
2011-10-20 18:06:23 +02:00
|
|
|
|
2011-07-27 09:12:09 +02:00
|
|
|
profile:
|
2014-10-22 17:42:57 +02:00
|
|
|
$(OCAMLBUILD) $(addsuffix .p.native,$(BIN))
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2012-06-06 15:55:23 +02:00
|
|
|
install:
|
2011-10-20 18:06:23 +02:00
|
|
|
$(INSTALL) -d $(INSTALL_BINDIR)
|
2014-10-22 17:42:57 +02:00
|
|
|
$(foreach t,$(BIN),$(INSTALL) $(t).$(TARGET) $(INSTALL_BINDIR)/$(t);)
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2015-02-27 15:50:21 +01:00
|
|
|
uninstall:
|
|
|
|
$(foreach t,$(BIN),$(RM) $(INSTALL_BINDIR)/$(t);)
|
|
|
|
|
2010-06-15 10:49:03 +02:00
|
|
|
clean:
|
2011-10-20 18:06:23 +02:00
|
|
|
$(OCAMLBUILD) -clean
|
2013-11-08 15:46:31 +01:00
|
|
|
|
|
|
|
.PHONY: doc
|
2013-11-08 18:51:06 +01:00
|
|
|
doc: $(TARGET)
|
|
|
|
# Filter unused modules by scanning built ones:
|
|
|
|
find _build -regex '.*.cmi?' -printf '%f\n' \
|
2013-11-08 15:46:31 +01:00
|
|
|
| sed -e '/ocamlbuild/ d; s/\(.*\)\.cmi$$/\u\1/' \
|
|
|
|
| sort > doc.odocl;
|
|
|
|
$(OCAMLBUILD) doc.docdir/index.html
|