summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2017-05-08 14:10:54 +0100
committerRobert Norton2017-05-08 15:29:55 +0100
commit659bb75597fe50eaa8cd96fd97bd83dffcadd56a (patch)
treeed1167b3c12321ce4744aaab2f20c71c196dedf2
parentff73bbca7cc4962ce5d4d87e4c664410ed530a31 (diff)
add target for building ocaml shallow embed for arm.
-rw-r--r--arm/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/arm/Makefile b/arm/Makefile
index 641a907e..18eba393 100644
--- a/arm/Makefile
+++ b/arm/Makefile
@@ -1,6 +1,6 @@
BUILDDIR=./build
-SAIL=../sail -verbose
+SAIL=../sail
ifeq ("$(wildcard $(SAIL))","")
$(warning can not find Sail)
endif
@@ -28,7 +28,9 @@ all: $(BUILDDIR)/armv8.ml
clean:
rm -rf $(BUILDDIR)
-.PHONY: all clean
+ocaml: $(BUILDDIR)/armv8_embed.ml
+
+.PHONY: all clean ocaml
$(BUILDDIR):
mkdir -p $@
@@ -41,6 +43,12 @@ $(BUILDDIR)/armv8.lem: $(SOURCES) | $(BUILDDIR)
$(BUILDDIR)/armv8.ml: $(BUILDDIR)/armv8.lem
$(LEM) -ocaml -lib $(LEMINTERPDIR) $<
+$(BUILDDIR)/armv8_embed.ml: $(SOURCES) | $(BUILDDIR)
+ $(SAIL) -ocaml $(SOURCES) -o $(basename $@)
+# sail generates the .lem file in pwd
+ mv $(notdir $@) $@
+
+
######################################################################
ETCDIR=../etc