Skip to content

Commit

Permalink
Makefile: update wrt ocaml extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Armael committed Oct 16, 2022
1 parent 587c44c commit 4ee8310
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
17 changes: 7 additions & 10 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
OCAMLBUILD := env OCAMLPATH=$(shell pwd) ocamlbuild \
-tag thread -tag debug -use-ocamlfind \
-lib str -lib nums \
-I codegen -I mllib \
-package extunix -package zarith -package ocamlfuse
MODULES := Lock Nomega Word WordAuto WordZ Bytes Rounding \
Mem AsyncDisk Pred Prog ProgMonad PredCrash Hoare \
OperationalSemantics \
Expand Down Expand Up @@ -50,10 +45,11 @@ HSLIB_POST := hslib/Disk.hs hslib/Interpreter.hs

all: fscq mkfs

%: %.ml $(VS_ML) $(wildcard */*.ml)
rm -f $@
$(OCAMLBUILD) -no-links $@.native
ln -s $(CURDIR)/_build/$@.native $@
mlbin/mkfs.exe: mlbin/mkfs.ml $(VS_ML) $(wildcard mllib/*.ml)
dune build $@

mlbin/fscqfuse.exe: mlbin/fscqfuse.ml $(VS_ML) $(wildcard mllib/*.ml)
dune build $@

hscgen/%.hs: hslib/%.hsc
@mkdir -p $(@D)
Expand Down Expand Up @@ -118,6 +114,7 @@ hslib/libopfuse.a: hslib/opqueue.o hslib/opfuse.o
clean:
rm -rf codegen coqbuild _build fstest hstest gotest disk.img \
fscq mkfs *.o *.hi \
hslib/*.o hscgen
hslib/*.o hscgen \
mlbin/*.exe

.PRECIOUS: hscgen/%.hs %_stubs.c
8 changes: 6 additions & 2 deletions src/mlbin/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
(executable
(name mkfs)
(libraries fscq zarith)
(modules mkfs))
(modules mkfs)
(promote (until-clean))
)

(executable
(name fscqfuse)
(libraries fscq fuse fpath)
(modules fscqfuse))
(modules fscqfuse)
(promote (until-clean))
)

0 comments on commit 4ee8310

Please sign in to comment.