1
# Copyright (C) 2006 Imperial College London and others.
3
# Please see the AUTHORS file in the main source directory for a full list
4
# of copyright holders.
7
# Applied Modelling and Computation Group
8
# Department of Earth Science and Engineering
9
# Imperial College London
11
# amcgsoftware@imperial.ac.uk
13
# This library is free software; you can redistribute it and/or
14
# modify it under the terms of the GNU Lesser General Public
15
# License as published by the Free Software Foundation,
16
# version 2.1 of the License.
18
# This library is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
# Lesser General Public License for more details.
23
# You should have received a copy of the GNU Lesser General Public
24
# License along with this library; if not, write to the Free Software
25
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
30
FCFLAGS = -I../../include @FCFLAGS@ @MODINC_FLAG@../
33
CFLAGS = @CFLAGS@ -I../../include
35
CXX = @CXX@ -I../../include
36
CXXFLAGS= @CPPFLAGS@ @CXXFLAGS@ -I../../include
40
LIBS = ./lib/libadaptivity.a ./lib/libvtkfortran.a ./lib/libspatialindex.a ./lib/libspud.a ./lib/libjudy.a @LIBS@
41
LIBFLUIDITY=../../lib/lib@FLUIDITY@.a
43
# the test binaries NOT to be built
46
# the test programs to be built:
47
TEST_BINARIES=$(filter-out $(DISABLED_TESTS), $(basename $(wildcard *.F90)))
49
unittest: $(TEST_BINARIES)
50
ln -sf $(addprefix ../../radiation/tests/,$(TEST_BINARIES)) ../../bin/tests/
52
.SUFFIXES: .f90 .F90 .c .cpp .o .a $(.SUFFIXES)
55
$(FC) $(FCFLAGS) -c $<
57
$(FC) $(FCFLAGS) -c $<
61
$(CXX) $(CXXFLAGS) -c $<
63
# creates a TESTNAME_main.o from test_main.cpp which calls the subroutine
64
# TESTNAME, that should be a subroutine in TESTNAME.F90
66
$(CXX) $(CXXFLAGS) -D TESTNAME=$(subst _main.o,,$@)_ -o $@ -c test_main.cpp @PROFILING_FLAG@
68
# link this TESTNAME_main.o with TESTNAME.o from TESTNAME.F90
70
$(CXX) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBFLUIDITY) $(LIBS) @PROFILING_FLAG@
73
# make a temp sym-link to the directory containing fluidity, adapt and sam libs
78
rm -f $(TEST_BINARIES)