Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 93119c3f

History | View | Annotate | Download (3.06 KB)

1
prefix=@prefix@
2
exec_prefix=@exec_prefix@
3
bindir=@bindir@
4
datarootdir = ${prefix}/share
5
includedir = ${prefix}/include
6

    
7
LUSI_LIBS=include/lustrec_math.lusi include/simulink_math_fcn.lusi include/conv.lusi
8
LUSI_MPFR_LIB=include/mpfr_lustre.lusi
9
LOCAL_BINDIR=bin
10
LOCAL_DOCDIR=doc/manual
11

    
12
DEFAULT_TEST_TARGET=COMPIL_LUS\|MAKE\|BIN\|DIFF
13

    
14
all: lustrec lustret
15

    
16
lustrec:
17
	@echo Compiling binary lustrec
18
	@make -C src lustrec
19

    
20
lustret:
21
	@echo Compiling binary lustret
22
	@make -C src lustret
23

    
24
lustresf:
25
	@echo Compiling binary lustresf
26
	@make -C src lustresf
27

    
28
configure: configure.ac
29
	@echo configure.ac has changed relaunching autoconf
30
	@autoconf
31

    
32
Makefile: Makefile.in config.status configure
33
	@echo Makefile.in has changed relaunching autoconf
34
	@./config.status --recheck
35

    
36
doc:
37
	@echo Generating doc
38
	@make -C src doc
39

    
40
dot: doc
41
	@make -C src dot
42

    
43
clean: clean-lusic
44
	@make -C src clean
45

    
46
dist-src-clean: clean
47
	@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h
48
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags
49

    
50
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
51

    
52
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
53
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
54
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
55
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
56

    
57
dist-clean: dist-src-clean
58
	@rm -f configure Makefile
59

    
60
%.lusic: %.lusi
61
	@echo Compiling $<
62
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $< 
63

    
64
clean-lusic:
65
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
66
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
67

    
68
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
69

    
70
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
71
	@echo Compiling $<
72
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
73

    
74
install-include: compile-lusi compile-mpfr-lusi
75
	mkdir -p ${includedir}/lustrec
76
	cp include/* ${includedir}/lustrec
77

    
78
install-base: clean-lusic
79
	mkdir -p ${bindir}
80
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
81
	mkdir -p ${datarootdir}
82
	install -m 0655 share/FindLustre.cmake ${datarootdir}
83

    
84
install: install-base install-include 
85

    
86
test-config: ${bindir}/lustrec
87
	if @PATH_TO_TESTS_DEFINED@; then \
88
	  mkdir -p test; \
89
	  cd test; \
90
	  cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@GITBRANCH@ ../@PATH_TO_TESTS@; \
91
	fi
92

    
93
test-no-submit: test-config
94
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET}
95

    
96
test-submit: test-config
97
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET}
98

    
99
test: test-config
100
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET}
101

    
102
test-full-no-submit: test-config
103
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test 
104

    
105
test-full-submit: test-config
106
	cd test; ctest -M Experimental -T Submit 
107

    
108
test-full: test-config
109
	cd test; ctest -D Experimental 
110

    
111

    
112
.PHONY: all compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean 
113