heptagon/compiler/Makefile

62 lines
1.3 KiB
Makefile
Raw Normal View History

include ../config
2010-06-15 10:49:03 +02:00
BIN:=heptc.$(TARGET)
ifeq ($(ENABLE_SIMULATOR), yes)
BIN:=$(BIN) hepts.$(TARGET)
endif
ifeq ($(ENABLE_CTRL2EPT), yes)
BIN:=$(BIN) ctrl2ept.$(TARGET)
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:
ifeq ($(ENABLE_SIMULATOR), yes)
$(OCAMLBUILD) $(COMPILER).native $(SIMULATOR).native
else
$(OCAMLBUILD) $(COMPILER).native
endif
byte:
ifeq ($(ENABLE_SIMULATOR), yes)
$(OCAMLBUILD) $(COMPILER).byte $(SIMULATOR).byte
else
$(OCAMLBUILD) $(COMPILER).byte
endif
2010-06-15 10:49:03 +02:00
debug:
ifeq ($(ENABLE_SIMULATOR), yes)
$(OCAMLBUILD) $(COMPILER).d.byte $(SIMULATOR).d.byte
else
$(OCAMLBUILD) $(COMPILER).d.byte
endif
profile:
ifeq ($(ENABLE_SIMULATOR), yes)
$(OCAMLBUILD) $(COMPILER).p.native $(SIMULATOR).p.native
else
$(OCAMLBUILD) $(COMPILER).p.native
endif
2010-06-15 10:49:03 +02:00
install:
$(INSTALL) -d $(INSTALL_BINDIR)
$(INSTALL) $(COMPILER).$(TARGET) $(INSTALL_BINDIR)/$(COMPILER)
ifeq ($(ENABLE_SIMULATOR), yes)
$(INSTALL) $(SIMULATOR).$(TARGET) $(INSTALL_BINDIR)/$(SIMULATOR)
endif
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