1
|
prefix=@prefix@
|
2
|
exec_prefix=@exec_prefix@
|
3
|
bindir=@bindir@
|
4
|
datarootdir = ${prefix}/share
|
5
|
includedir = ${prefix}/include
|
6
|
|
7
|
LUSI_LIBS=include/math.lusi include/conv.lusi
|
8
|
LUSI_MPFR_LIB=include/mpfr_lustre.lusi
|
9
|
LOCAL_BINDIR=bin
|
10
|
LOCAL_DOCDIR=doc/manual
|
11
|
|
12
|
all: lustrec lustret
|
13
|
|
14
|
lustrec:
|
15
|
@echo Compiling binary lustrec
|
16
|
@make -C src lustrec
|
17
|
|
18
|
lustret:
|
19
|
@echo Compiling binary lustret
|
20
|
@make -C src lustret
|
21
|
|
22
|
configure: configure.ac
|
23
|
@echo configure.ac has changed relaunching autoconf
|
24
|
@autoconf
|
25
|
|
26
|
Makefile: Makefile.in config.status configure
|
27
|
@echo Makefile.in has changed relaunching autoconf
|
28
|
@./config.status --recheck
|
29
|
|
30
|
doc:
|
31
|
@echo Generating doc
|
32
|
@make -C src doc
|
33
|
|
34
|
dot: doc
|
35
|
@make -C src dot
|
36
|
|
37
|
clean: clean-lusic
|
38
|
@make -C src 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 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 ${datarootdir}
|
73
|
install -m 0655 share/FindLustre.cmake ${datarootdir}
|
74
|
|
75
|
.PHONY: all compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean
|
76
|
|