Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ bde99c3f

History | View | Annotate | Download (2.86 KB)

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 40d33d55 xavier.thirioux
all: $(LOCAL_BINDIR)/lustrec $(LOCAL_BINDIR)/lustret
15
16 084a3cb5 Eric NOULARD
$(LOCAL_BINDIR)/lustrec: configure Makefile
17 1e48ef45 ploc
	@echo Compiling binary lustrec
18 40d33d55 xavier.thirioux
	@$(OCAMLBUILD) -cflags -I,@OCAMLGRAPH_PATH@ -lflag @OCAMLGRAPH_PATH@/graph.cmxa -lflag -I src -I src/backends/C -I src/plugins/scopes src/main_lustre_compiler.native
19 2e6dfb46 enoulard
	@mkdir -p $(LOCAL_BINDIR)
20
	@mv _build/src/main_lustre_compiler.native $(LOCAL_BINDIR)/lustrec
21 1e48ef45 ploc
22 40d33d55 xavier.thirioux
$(LOCAL_BINDIR)/lustret: configure Makefile
23
	@echo Compiling binary lustret
24
	@$(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_testgen.native
25
	@mkdir -p $(LOCAL_BINDIR)
26
	@mv _build/src/main_lustre_testgen.native $(LOCAL_BINDIR)/lustret
27
28 d057583b Eric NOULARD
configure: configure.ac
29 084a3cb5 Eric NOULARD
	@echo configure.ac has changed relaunching autoconf
30 d057583b Eric NOULARD
	@autoconf
31 084a3cb5 Eric NOULARD
32 03bb8f64 Eric NOULARD
Makefile: Makefile.in config.status configure
33 084a3cb5 Eric NOULARD
	@echo Makefile.in has changed relaunching autoconf
34 03bb8f64 Eric NOULARD
	@./config.status --recheck
35 084a3cb5 Eric NOULARD
36 1e48ef45 ploc
doc:
37
	@echo Generating doc
38 2e6dfb46 enoulard
	@$(OCAMLBUILD) lustrec.docdir/index.html
39
	@rm -rf $(LOCAL_DOCDIR)
40
	@cp -rf _build/lustrec.docdir $(LOCAL_DOCDIR)
41 1e48ef45 ploc
42
dot: doc
43 2e6dfb46 enoulard
	$(OCAMLBUILD) lustrec.docdir/lustrec.dot
44
	dot -T ps -o lustrec.dot _build/lustrec.docdir/lustrec.dot
45
	mv _build/lustrec.docdir/lustrec.dot $(LOCAL_DOCDIR)
46 1e48ef45 ploc
47
clean:
48 2e6dfb46 enoulard
	$(OCAMLBUILD) -clean
49 1e48ef45 ploc
50 974f92ac Eric NOULARD
dist-src-clean: clean
51
	@rm -f config.log config.status include/*.lusic include/math.h include/conv.h include/mpfr_lustre.h
52
53
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
54
55
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
56
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
57
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
58
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
59
60
dist-clean: dist-src-clean
61
	@rm -f myocamlbuild.ml configure Makefile
62 1e48ef45 ploc
63 2e6dfb46 enoulard
%.lusic: %.lusi
64 1e48ef45 ploc
	@echo Compiling $<
65
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $< 
66
67 3cb2f745 ploc
clean-lusic:
68 82dad07e enoulard
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
69 04a63d25 xthirioux
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
70 3cb2f745 ploc
71 2e6dfb46 enoulard
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
72 1e48ef45 ploc
73 04a63d25 xthirioux
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
74
	@echo Compiling $<
75
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
76
77
install: clean-lusic compile-lusi compile-mpfr-lusi
78 1e48ef45 ploc
	mkdir -p ${bindir}
79
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
80
	mkdir -p ${includedir}/lustrec
81
	cp include/* ${includedir}/lustrec
82 1d906976 enoulard
	mkdir -p ${datadir}
83 2e6dfb46 enoulard
	install -m 0655 share/FindLustre.cmake ${datadir}
84 1e48ef45 ploc
85 40d33d55 xavier.thirioux
.PHONY: compile-lusi doc dot lustrec lustret lustrec.odocl clean install dist-clean