1
# Copyright (C) 2007 Imperial College London and others.
3
# Please see the AUTHORS file in the main source directory for a full list
4
# of copyright holders.
6
# Applied Modelling and Computation Group
7
# Department of Earth Science and Engineering
8
# Imperial College London
10
# David.Ham@Imperial.ac.uk
12
# This library is free software; you can redistribute it and/or
13
# modify it under the terms of the GNU Lesser General Public
14
# License as published by the Free Software Foundation,
15
# version 2.1 of the License.
17
# This library is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
# Lesser General Public License for more details.
22
# You should have received a copy of the GNU Lesser General Public
23
# License along with this library; if not, write to the Free Software
24
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
30
FCFLAGS = -Iinclude -DUSING_GFORTRAN=1 -DNDEBUG=1 -O3 -ffast-math -frecord-marker=4 -I/usr/include -ffree-line-length-none -ffixed-line-length-none
33
CXXFLAGS= -Iinclude -DUSING_GFORTRAN=1 -DNDEBUG=1 -O3
40
LIBS = $(shell echo -lpthread -lm -lstdc++ -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath | sed 's/-L /-L/g')
42
HEADERS = include/spud.h include/spud include/spud_enums.h include/tinystr.h include/tinyxml.h
44
OBJS = spud.lo spud_interfaces.lo tinystr.lo tinyxml.lo tinyxmlerror.lo tinyxmlparser.lo fspud.lo
48
.SUFFIXES: .f90 .F90 .c .cpp .lo .la
51
./libtool --mode=compile --tag=FC $(FC) $(FCFLAGS) -c $<
53
./libtool --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) -c $<
55
default: libspud.la build-diamond
58
./libtool --mode=link --tag=FC $(FC) $(FCFLAGS) -o $(LIB) $(OBJS) $(LIBS) -rpath /data/src/fluidity/fluidity_enkf_reduced_new/libspud/../lib
59
if test -f .libs/libspud.a; then cp .libs/libspud.a .; fi
60
(if test -f .libs/libspud.so; then cp .libs/libspud.so ./libspud.so.0; ln -s libspud.so.0 libspud.so; fi) || true
63
cd diamond; python setup.py build; cd ..
68
@cd src/tests; $(MAKE)
73
@cd doc; $(MAKE) spud_manual.pdf
75
install: install-libspud install-spudtools install-diamond install-pyspud install-dxdiff
77
install-libspud: libspud.la
78
/usr/bin/install -c -d $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../lib
79
/usr/bin/install -c -d $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../include
80
/usr/bin/install -c libspud.a $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../lib
81
(if test -f libspud.so.0; then /usr/bin/install -c libspud.so.0 $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../lib; fi) || true
82
(if test -f libspud.so; then cd $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../lib/; ln -s libspud.so.0 libspud.so; cd -; fi) || true
83
/usr/bin/install -c $(MODS) $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../include
84
/usr/bin/install -c $(HEADERS) $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../include
87
/usr/bin/install -c -d $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../share/spud
88
/usr/bin/install -c -d $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../bin
89
/usr/bin/install -c -m755 bin/spud-preprocess $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../bin
90
/usr/bin/install -c -m755 bin/spud-set $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../bin
91
/usr/bin/install -c -m644 schema/spud_base.rnc $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../share/spud
92
/usr/bin/install -c -m644 schema/spud_base.rng $(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/../share/spud
95
cd diamond; python setup.py install --prefix=$(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/..; cd ..
98
ifeq ($(origin BUILDING_DEBIAN),undefined)
99
cd python; python setup.py install --prefix=$(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/..; cd ..
101
cd python; for python in $(shell pyversions -r); do $$python setup.py install --prefix=$(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/.. --install-layout=deb; done; cd ..
105
ifeq ($(origin DESTDIR),undefined)
106
cd dxdiff; python setup.py install --prefix=$(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/..; cd ..
108
cd dxdiff; for python in $(shell pyversions -r); do $$python setup.py install --prefix=$(DESTDIR)/data/src/fluidity/fluidity_enkf_reduced_new/libspud/.. --install-layout=deb; done; cd ..
112
@cd doc; $(MAKE) clean
113
rm -f *.o libspud.a libspud.so* *.o *.la *.mod *.lo
115
@cd src/tests; $(MAKE) clean
116
@cd diamond; rm -rf build; cd ..
117
@cd python; rm -rf build; cd ..
118
@cd dxdiff; rm -rf build; cd ..
122
@cd src/tests; $(MAKE) distclean
123
rm -fr config.log config.status libtool autom4te.cache Makefile
124
rm -f Makefile src/tests/Makefile examples/Makefile
125
rm -f bin/spud-preprocess
126
rm -f diamond/setup.py diamond/diamond/plugins.py diamond/diamond/preprocess.py