Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ f3d244c1

History | View | Annotate | Download (1.73 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
LUSI_MPFR_LIB=include/mpfr_lustre.lusi
11
LOCAL_BINDIR=bin
12
LOCAL_DOCDIR=doc/manual
13

    
14
lustrec:
15
	@echo Compiling binary lustrec
16
	@$(OCAMLBUILD) -cflags -I,@OCAMLGRAPH_PATH@ -lflag @OCAMLGRAPH_PATH@/graph.cmxa -lflag nums.cmxa -I src -I src/backends/C -I src/plugins/scopes src/main_lustre_compiler.native
17
	@mkdir -p $(LOCAL_BINDIR)
18
	@mv _build/src/main_lustre_compiler.native $(LOCAL_BINDIR)/lustrec
19

    
20
doc:
21
	@echo Generating doc
22
	@$(OCAMLBUILD) lustrec.docdir/index.html
23
	@rm -rf $(LOCAL_DOCDIR)
24
	@cp -rf _build/lustrec.docdir $(LOCAL_DOCDIR)
25

    
26
dot: doc
27
	$(OCAMLBUILD) lustrec.docdir/lustrec.dot
28
	dot -T ps -o lustrec.dot _build/lustrec.docdir/lustrec.dot
29
	mv _build/lustrec.docdir/lustrec.dot $(LOCAL_DOCDIR)
30

    
31
clean:
32
	$(OCAMLBUILD) -clean
33

    
34
dist-clean: clean
35
	@rm -f Makefile myocamlbuild.ml config.log config.status configure include/*.lusic include/math.h include/conv.h include/mpfr_lustre.h
36

    
37
%.lusic: %.lusi
38
	@echo Compiling $<
39
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $< 
40

    
41
clean-lusic:
42
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
43
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
44

    
45
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
46

    
47
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
48
	@echo Compiling $<
49
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
50

    
51
install: clean-lusic compile-lusi compile-mpfr-lusi
52
	mkdir -p ${bindir}
53
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
54
	mkdir -p ${includedir}/lustrec
55
	cp include/* ${includedir}/lustrec
56
	mkdir -p ${datadir}
57
	install -m 0655 share/FindLustre.cmake ${datadir}
58

    
59
.PHONY: compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean
60