Project

General

Profile

Download (2.81 KB) Statistics
| Branch: | Tag: | Revision:
1 1e48ef45 ploc
OCAMLBUILD=@OCAMLBUILD@ -classic-display -no-links 
2
3
prefix=@prefix@
4
exec_prefix=@exec_prefix@
5
bindir=@bindir@
6 0b352b14 xthirioux
datadir = ${prefix}/share
7 1e48ef45 ploc
includedir = ${prefix}/include
8
9
LUSI_LIBS=include/math.lusi include/conv.lusi
10 04a63d25 xthirioux
LUSI_MPFR_LIB=include/mpfr_lustre.lusi
11 1e48ef45 ploc
LOCAL_BINDIR=bin
12
LOCAL_DOCDIR=doc/manual
13
14 084a3cb5 Eric NOULARD
$(LOCAL_BINDIR)/lustrec: configure Makefile
15 1e48ef45 ploc
	@echo Compiling binary lustrec
16 04a63d25 xthirioux
	@$(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 2e6dfb46 enoulard
	@mkdir -p $(LOCAL_BINDIR)
18
	@mv _build/src/main_lustre_compiler.native $(LOCAL_BINDIR)/lustrec
19 1e48ef45 ploc
20 7ecfca04 ploc
$(LOCAL_BINDIR)/lustrem: configure Makefile
21
	@echo Compiling binary lustrem
22
	@$(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_mutator.native
23
	@mkdir -p $(LOCAL_BINDIR)
24
	@mv _build/src/main_lustre_mutator.native $(LOCAL_BINDIR)/lustrem
25
26 d057583b Eric NOULARD
configure: configure.ac
27 084a3cb5 Eric NOULARD
	@echo configure.ac has changed relaunching autoconf
28 d057583b Eric NOULARD
	@autoconf
29 084a3cb5 Eric NOULARD
30 03bb8f64 Eric NOULARD
Makefile: Makefile.in config.status configure
31 084a3cb5 Eric NOULARD
	@echo Makefile.in has changed relaunching autoconf
32 03bb8f64 Eric NOULARD
	@./config.status --recheck
33 084a3cb5 Eric NOULARD
34 1e48ef45 ploc
doc:
35
	@echo Generating doc
36 2e6dfb46 enoulard
	@$(OCAMLBUILD) lustrec.docdir/index.html
37
	@rm -rf $(LOCAL_DOCDIR)
38
	@cp -rf _build/lustrec.docdir $(LOCAL_DOCDIR)
39 1e48ef45 ploc
40
dot: doc
41 2e6dfb46 enoulard
	$(OCAMLBUILD) lustrec.docdir/lustrec.dot
42
	dot -T ps -o lustrec.dot _build/lustrec.docdir/lustrec.dot
43
	mv _build/lustrec.docdir/lustrec.dot $(LOCAL_DOCDIR)
44 1e48ef45 ploc
45
clean:
46 2e6dfb46 enoulard
	$(OCAMLBUILD) -clean
47 1e48ef45 ploc
48 974f92ac Eric NOULARD
dist-src-clean: clean
49
	@rm -f config.log config.status include/*.lusic include/math.h include/conv.h include/mpfr_lustre.h
50
51
DIST_ARCHIVE_NAME=lustrec-$(shell $(LOCAL_BINDIR)/lustrec -version | grep version | cut -d, -f 2 | sed -e "s/ version //" -e "s/ (/-/" -e "s/ /-/" -e "s/\//-/" -e "s/)//")-src.tar.gz
52
53
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
54
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
55
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
56
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
57
58
dist-clean: dist-src-clean
59
	@rm -f myocamlbuild.ml configure Makefile
60 1e48ef45 ploc
61 2e6dfb46 enoulard
%.lusic: %.lusi
62 1e48ef45 ploc
	@echo Compiling $<
63
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $< 
64
65 3cb2f745 ploc
clean-lusic:
66 82dad07e enoulard
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
67 04a63d25 xthirioux
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
68 3cb2f745 ploc
69 2e6dfb46 enoulard
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
70 1e48ef45 ploc
71 04a63d25 xthirioux
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
72
	@echo Compiling $<
73
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
74
75
install: clean-lusic compile-lusi compile-mpfr-lusi
76 1e48ef45 ploc
	mkdir -p ${bindir}
77
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
78
	mkdir -p ${includedir}/lustrec
79
	cp include/* ${includedir}/lustrec
80 1d906976 enoulard
	mkdir -p ${datadir}
81 2e6dfb46 enoulard
	install -m 0655 share/FindLustre.cmake ${datadir}
82 1e48ef45 ploc
83
.PHONY: compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean