heptagon/compiler/Makefile

46 lines
912 B
Makefile
Raw Normal View History

include ../config
2010-06-15 10:49:03 +02:00
BIN:=$(COMPILER)
ifeq ($(ENABLE_SIMULATOR), yes)
BIN:=$(BIN) $(SIMULATOR)
endif
ifeq ($(ENABLE_CTRL2EPT_TRANSLATOR), yes)
BIN:=$(BIN) $(CTRLNBAC2EPT_TRANSLATOR)
endif
2010-06-15 10:49:03 +02:00
.PHONY: all clean native byte clean debug install
2010-06-15 10:49:03 +02:00
all: $(TARGET)
native:
$(OCAMLBUILD) $(addsuffix .native,$(BIN))
byte:
$(OCAMLBUILD) $(addsuffix .byte,$(BIN))
2010-06-15 10:49:03 +02:00
debug:
$(OCAMLBUILD) $(addsuffix .d.byte,$(BIN))
profile:
$(OCAMLBUILD) $(addsuffix .p.native,$(BIN))
2010-06-15 10:49:03 +02:00
install:
$(INSTALL) -d $(INSTALL_BINDIR)
$(foreach t,$(BIN),$(INSTALL) $(t).$(TARGET) $(INSTALL_BINDIR)/$(t);)
2010-06-15 10:49:03 +02:00
uninstall:
$(foreach t,$(BIN),$(RM) $(INSTALL_BINDIR)/$(t);)
2010-06-15 10:49:03 +02:00
clean:
$(OCAMLBUILD) -clean
.PHONY: doc
doc: $(TARGET)
# Filter unused modules by scanning built ones:
find _build -regex '.*.cmi?' -printf '%f\n' \
| sed -e '/ocamlbuild/ d; s/\(.*\)\.cmi$$/\u\1/' \
| sort > doc.odocl;
$(OCAMLBUILD) doc.docdir/index.html