forked from FLAME-HPC/FLAMEII
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.am
More file actions
147 lines (124 loc) · 4.3 KB
/
Makefile.am
File metadata and controls
147 lines (124 loc) · 4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# ============================================================================
# Desc : Master automake configuration
# Author : Shawn Chin
# Date : October 2012
# License : GNU Lesser General Public License
# Copyright (c) 2012 STFC Rutherford Appleton Laboratory
# Copyright (c) 2012 University of Sheffield
# ============================================================================
# $Id$
# Pass additional flags to make
ACLOCAL_AMFLAGS = -I m4
# Directories to search and build
SUBDIRS = \
flame2/mb \
flame2/io \
flame2/mem \
flame2/exe \
flame2/api \
flame2/exceptions \
flame2/model \
flame2/sim \
utils \
xparser2
# Directories to include in the distribution
DIST_SUBDIRS = $(SUBDIRS) tests
# Libraries to link and install (populated by conditional block below)
lib_LTLIBRARIES =
# List of convenience libraries to link to form the final library.
# Note that the build type and file extensions are automatically appended
# depending on the build type
LIBADD_LIST = \
flame2/mb/lib_flame_mb \
flame2/exe/lib_flame_exe \
flame2/mem/lib_flame_mem \
flame2/api/lib_flame_api \
flame2/io/lib_flame_io \
flame2/model/lib_flame_model \
flame2/sim/lib_flame_sim
if BUILD_DEBUG
lib_LTLIBRARIES += libflame2-dbg.la
libflame2_dbg_la_SOURCES =
libflame2_dbg_la_LDFLAGSS = @COMMON_LDFLAGS@
libflame2_dbg_la_LIBADD = $(LIBADD_LIST:=-dbg.la)
endif
if BUILD_PROD
lib_LTLIBRARIES += libflame2-prod.la
libflame2_prod_la_SOURCES =
libflame2_prod_la_LDFLAGSS = @COMMON_LDFLAGS@
libflame2_prod_la_LIBADD = $(LIBADD_LIST:=-prod.la)
endif
if BUILD_TEST
lib_LTLIBRARIES += libflame2-test.la
libflame2_test_la_SOURCES =
libflame2_test_la_LDFLAGSS = @COMMON_LDFLAGS@
libflame2_test_la_LIBADD = $(LIBADD_LIST:=-test.la)
endif
# API headers
include_HEADERS = \
flame2/api/flame2.hpp \
flame2/config.hpp
# Extra files to add into distribution
EXTRA_DIST = AUTHORS NEWS INSTALL README ChangeLog \
tests/io/models \
tests/sim/models \
tests/model/models \
tests/xparser2/data
# Install custom libtool along with distribution
bin_SCRIPTS = libtool
# build xparser2 binary
bin_PROGRAMS = xparser
xparser_LIBS = @COMMON_LIBS@
xparser_SOURCES = xparser2/xparser2.cpp
xparser_CPPFLAGS = @COMMON_CPPFLAGS@ @CPPFLAGS_DBG@ @AM_CPPFLAGS@ -DPKGDATADIR="\"$(pkgdatadir)\""
xparser_LDFLAGS = @COMMON_LDFLAGS@ -rpath @BOOST_LIBDIR@
xparser_LDADD = xparser2/lib_xparser2.la libflame2-@LOWEST_BUILD_SUFFIX@.la @COMMON_LIBS@
# Commands to run after installation complete
install-exec-hook:
@mv $(DESTDIR)$(bindir)/libtool $(DESTDIR)$(bindir)/flame2-libtool
uninstall-hook:
@rm $(DESTDIR)$(bindir)/flame2-libtool
# Commands to run before packing up the distribution
dist-hook:
@find $(distdir) -name ".svn" -print0 | xargs -0 rm -rf
if BUILD_TEST
test:
@( \
find flame2 -name "*.cpp" | xargs grep flame2/config.hpp -L > test_cfg_incl ;\
if test -s test_cfg_incl; then \
echo "---------------------------------------------------------------" ;\
echo "" ;\
echo "OOppps. The following cpp files do no include flame2/config.hpp" ;\
while read line; do echo "- $$line"; done < test_cfg_incl ;\
echo "" ;\
echo "Please add the following include statement to those files to " ;\
echo "ensure that they are properly rebuilt when required:" ;\
echo "#include \"flame2/config.hpp\"" ;\
echo "" ;\
echo "---------------------------------------------------------------" ;\
rm test_cfg_incl ;\
exit 1 ;\
fi ;\
find flame2 -name "*.hpp" | xargs grep flame2/config.hpp -l > test_cfg_incl ;\
if test -s test_cfg_incl; then \
echo "---------------------------------------------------------------" ;\
echo "" ;\
echo "OOppps. The following hpp files include flame2/config.hpp" ;\
while read line; do echo "- $$line"; done < test_cfg_incl ;\
echo "" ;\
echo "Please do not include config.hpp in header files as it contains " ;\
echo "platform-specific definitions and is not installed along with" ;\
echo "other header files." ;\
echo "" ;\
echo "---------------------------------------------------------------" ;\
rm test_cfg_incl ;\
exit 1 ;\
fi ;\
rm test_cfg_incl ;\
)
@(make && cd tests && make && ./run_tests --report_level=short --show_progress)
else
test:
@echo "** TEST BUILD NOT ENABLED"
@echo " To build the tests, rerun ./configure with --enable-test-build"
endif