Project

General

Profile

Download (2.24 KB) Statistics
| Branch: | Tag: | Revision:
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
$(LOCAL_BINDIR)/lustrec: configure Makefile
15
	@echo Compiling binary lustrec
16
	@make -C src
17

    
18
configure: configure.ac
19
	@echo configure.ac has changed relaunching autoconf
20
	@autoconf
21

    
22
Makefile: Makefile.in config.status configure
23
	@echo Makefile.in has changed relaunching autoconf
24
	@./config.status --recheck
25

    
26
doc:
27
	@echo Generating doc
28
	@$(OCAMLBUILD) lustrec.docdir/index.html
29
	@rm -rf $(LOCAL_DOCDIR)
30
	@cp -rf _build/lustrec.docdir $(LOCAL_DOCDIR)
31

    
32
dot: doc
33
	$(OCAMLBUILD) lustrec.docdir/lustrec.dot
34
	dot -T ps -o lustrec.dot _build/lustrec.docdir/lustrec.dot
35
	mv _build/lustrec.docdir/lustrec.dot $(LOCAL_DOCDIR)
36

    
37
clean:
38
	$(OCAMLBUILD) -clean
39

    
40
dist-src-clean: clean
41
	@rm -f config.log config.status include/*.lusic include/math.h include/conv.h include/mpfr_lustre.h
42

    
43
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
44

    
45
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
46
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
47
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
48
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
49

    
50
dist-clean: dist-src-clean
51
	@rm -f myocamlbuild.ml configure Makefile
52

    
53
%.lusic: %.lusi
54
	@echo Compiling $<
55
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $< 
56

    
57
clean-lusic:
58
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
59
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
60

    
61
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
62

    
63
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
64
	@echo Compiling $<
65
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
66

    
67
install: clean-lusic compile-lusi compile-mpfr-lusi
68
	mkdir -p ${bindir}
69
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
70
	mkdir -p ${includedir}/lustrec
71
	cp include/* ${includedir}/lustrec
72
	mkdir -p ${datadir}
73
	install -m 0655 share/FindLustre.cmake ${datadir}
74

    
75
.PHONY: $(LOCAL_BINDIR)/lustrec compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean
76

    
(6-6/14)