1
|
OCAMLBUILD=@OCAMLBUILD@ -classic-display -no-links
|
2
|
|
3
|
prefix=@prefix@
|
4
|
exec_prefix=@exec_prefix@
|
5
|
bindir=@bindir@
|
6
|
datarootdir = ${prefix}/share
|
7
|
includedir = ${prefix}/include
|
8
|
|
9
|
LUSI_LIBS=include/math.lusi include/conv.lusi
|
10
|
LOCAL_BINDIR=bin
|
11
|
LOCAL_DOCDIR=doc/manual
|
12
|
|
13
|
lustrec:
|
14
|
@echo Compiling binary lustrec
|
15
|
@$(OCAMLBUILD) src/main_lustre_compiler.native
|
16
|
@mkdir -p $(LOCAL_BINDIR)
|
17
|
@mv _build/src/main_lustre_compiler.native $(LOCAL_BINDIR)/lustrec
|
18
|
|
19
|
doc:
|
20
|
@echo Generating doc
|
21
|
@$(OCAMLBUILD) lustrec.docdir/index.html
|
22
|
@rm -rf $(LOCAL_DOCDIR)
|
23
|
@cp -rf _build/lustrec.docdir $(LOCAL_DOCDIR)
|
24
|
|
25
|
dot: doc
|
26
|
$(OCAMLBUILD) lustrec.docdir/lustrec.dot
|
27
|
dot -T ps -o lustrec.dot _build/lustrec.docdir/lustrec.dot
|
28
|
mv _build/lustrec.docdir/lustrec.dot $(LOCAL_DOCDIR)
|
29
|
|
30
|
clean:
|
31
|
$(OCAMLBUILD) -clean
|
32
|
|
33
|
dist-clean: clean
|
34
|
rm -f Makefile myocamlbuild.ml config.log config.status configure include/*.lusic include/math.h include/conv.h
|
35
|
|
36
|
%.lusic: %.lusi
|
37
|
@echo Compiling $<
|
38
|
@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $<
|
39
|
|
40
|
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
|
41
|
|
42
|
install: compile-lusi
|
43
|
mkdir -p ${bindir}
|
44
|
install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
|
45
|
mkdir -p ${includedir}/lustrec
|
46
|
cp include/* ${includedir}/lustrec
|
47
|
install -m 0655 share/FindLustre.cmake ${datadir}
|
48
|
|
49
|
.PHONY: compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean
|
50
|
|