Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 843bc20f

History | View | Annotate | Download (1.46 KB)

1
OCAMLBUILD=@OCAMLBUILD@ -classic-display -no-links 
2

    
3
prefix=@prefix@
4
exec_prefix=@exec_prefix@
5
bindir=@bindir@
6
datadir = ${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) -cflags -I,@OCAMLGRAPH_PATH@ -lflag @OCAMLGRAPH_PATH@/graph.cmxa -I src -I src/backends/C 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
clean-lusic:
41
	rm $(LUSI_LIBS:%.lusi=%.lusic)
42

    
43
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
44

    
45
install: clean-lusic compile-lusi
46
	mkdir -p ${bindir}
47
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
48
	mkdir -p ${includedir}/lustrec
49
	cp include/* ${includedir}/lustrec
50
	mkdir -p ${datadir}
51
	install -m 0655 share/FindLustre.cmake ${datadir}
52

    
53
.PHONY: compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean
54