Commit 56a237dd authored by Raphaël Cauderlier's avatar Raphaël Cauderlier
Browse files

Install target and byte/native switch

parent c22da22d
......@@ -4,7 +4,9 @@
......@@ -2,8 +2,15 @@
DKS = $(wildcard *.dk)
DKOS = $(
# Change COMPILE_MODE to byte if you want bytecode
# instead of machine code
# The destination of the install target, without trailing slash
INSTALL_DIR = /usr/local/bin
.PHONY: clean depend
.SUFFIXES: .dk .dko .ml .native .v .vo
.SUFFIXES: .dk .dko .ml .native .byte .v .vo
dkcheck -e -nc $<
......@@ -13,21 +20,31 @@ DKOS = $(
ocamlbuild -use-menhir $@
ocamlbuild -use-menhir $@
all: $(DKOS) sigmaid.native
all: $(DKOS) sigmaid
depend: .depend
dkdep dk_*.dk > .depend
rm -rf *.dko *.vo .depend sigmaid.native _build
rm -rf *.dko *.vo *.glob .depend \ test.v \
sigmaid sigmaid.native sigmaid.byte _build
sigmaid: sigmaid.$(COMPILE_MODE)
ln -s sigmaid.$(COMPILE_MODE) sigmaid
install: sigmaid
install sigmaid $(INSTALL_DIR)/ sigmaid.native
./sigmaid.native test.sigma sigmaid.$(COMPILE_MODE)
./sigmaid.$(COMPILE_MODE) test.sigma
test.v: sigmaid.native
./sigmaid.native test.sigma
test.v: sigmaid.$(COMPILE_MODE)
./sigmaid.$(COMPILE_MODE) test.sigma
test.dko: dk_obj_examples.dko
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment