2011-10-20 18:06:23 +02:00
|
|
|
include ../config
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2011-10-20 18:06:23 +02:00
|
|
|
BIN:=heptc.$(TARGET)
|
2014-10-21 15:24:48 +02:00
|
|
|
|
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
|
|
|
BIN:=$(BIN) hepts.$(TARGET)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ENABLE_CTRL2EPT), yes)
|
|
|
|
BIN:=$(BIN) ctrl2ept.$(TARGET)
|
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:
|
2011-10-20 18:06:23 +02:00
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
|
|
|
$(OCAMLBUILD) $(COMPILER).native $(SIMULATOR).native
|
|
|
|
else
|
2011-07-27 09:12:09 +02:00
|
|
|
$(OCAMLBUILD) $(COMPILER).native
|
2011-10-20 18:06:23 +02:00
|
|
|
endif
|
|
|
|
|
2011-07-27 09:12:09 +02:00
|
|
|
byte:
|
2011-10-20 18:06:23 +02:00
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
|
|
|
$(OCAMLBUILD) $(COMPILER).byte $(SIMULATOR).byte
|
|
|
|
else
|
2011-07-27 09:12:09 +02:00
|
|
|
$(OCAMLBUILD) $(COMPILER).byte
|
2011-10-20 18:06:23 +02:00
|
|
|
endif
|
2010-06-15 10:49:03 +02:00
|
|
|
|
2011-07-27 09:12:09 +02:00
|
|
|
debug:
|
2011-10-20 18:06:23 +02:00
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
|
|
|
$(OCAMLBUILD) $(COMPILER).d.byte $(SIMULATOR).d.byte
|
|
|
|
else
|
2011-07-27 09:12:09 +02:00
|
|
|
$(OCAMLBUILD) $(COMPILER).d.byte
|
2011-10-20 18:06:23 +02:00
|
|
|
endif
|
|
|
|
|
2011-07-27 09:12:09 +02:00
|
|
|
profile:
|
2011-10-20 18:06:23 +02:00
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
|
|
|
$(OCAMLBUILD) $(COMPILER).p.native $(SIMULATOR).p.native
|
|
|
|
else
|
2011-07-27 09:12:09 +02:00
|
|
|
$(OCAMLBUILD) $(COMPILER).p.native
|
2011-10-20 18:06:23 +02:00
|
|
|
endif
|
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)
|
|
|
|
$(INSTALL) $(COMPILER).$(TARGET) $(INSTALL_BINDIR)/$(COMPILER)
|
|
|
|
ifeq ($(ENABLE_SIMULATOR), yes)
|
2012-06-13 15:13:53 +02:00
|
|
|
$(INSTALL) $(SIMULATOR).$(TARGET) $(INSTALL_BINDIR)/$(SIMULATOR)
|
2011-10-20 18:06:23 +02:00
|
|
|
endif
|
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
|