1
- # Downloading and compiling extra libraries
2
- # -----------------------------------------
3
-
4
- # $Id: Makefile.am,v 1.16 2010/05/06 21:20:38 hecht Exp $
1
+ # ###########################################################################
2
+ # This file is part of FreeFEM. #
3
+ # #
4
+ # FreeFEM is free software: you can redistribute it and/or modify #
5
+ # it under the terms of the GNU Lesser General Public License as #
6
+ # published by the Free Software Foundation, either version 3 of #
7
+ # the License, or (at your option) any later version. #
8
+ # #
9
+ # FreeFEM is distributed in the hope that it will be useful, #
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of #
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12
+ # GNU Lesser General Public License for more details. #
13
+ # #
14
+ # You should have received a copy of the GNU Lesser General Public License #
15
+ # along with FreeFEM. If not, see <http://www.gnu.org/licenses/>. #
16
+ # ###########################################################################
17
+ # SUMMARY : Downloading and compiling extra libraries
18
+ # LICENSE : LGPLv3
19
+ # ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
20
+ # AUTHORS : ...
21
+ # E-MAIL : ...
5
22
6
23
SUBDIRS =blas arpack umfpack
7
24
EXTRA_DIST = \
@@ -55,7 +72,7 @@ EXTRA_DIST= \
55
72
./yams/yamslib_internal.h \
56
73
ipopt/Makefile \
57
74
ipopt/Makefile.inc.in \
58
- ipopt/patch-IpBlas \
75
+ ipopt/patch-IpBlas \
59
76
ff-petsc/Makefile \
60
77
ff-petsc/Makefile-PETSc.inc \
61
78
ff-petsc/Makefile.complex \
64
81
65
82
# FFCS: See [[file:../../../configure.ac::tools_problems_all_platforms]] for reasons why some tools may be deactivated
66
83
67
-
68
84
MPI_SOFT = @TOOL_COMPILE_scalapack@ @TOOL_COMPILE_parmetis@ @TOOL_COMPILE_parmmg@ @TOOL_COMPILE_mumps@
69
85
70
86
LIST_SOFT = @DOWNLOAD_FFTW@ @TOOL_COMPILE_tetgen@ @TOOL_COMPILE_metis@ @TOOL_COMPILE_superlu@ \
@@ -90,134 +106,136 @@ lib/libMesh.a:lib include
90
106
cd ../src/libMesh && $(MAKE ) $(AM_MAKEFLAGS )
91
107
test -f ../src/libMesh/libMesh.a
92
108
mkdir -p include/libMesh
93
- cp ../src/libMesh/* h include/libMesh
94
- echo libMesh LD -L@DIR@/lib -lMesh > lib/WHERE.libMesh
109
+ cp ../src/libMesh/* h include/libMesh
110
+ echo libMesh LD -L@DIR@/lib -lMesh > lib/WHERE.libMesh
95
111
echo libMesh INCLUDE -I@DIR@/include/libMesh >> lib/WHERE.libMesh
96
112
cp ../src/libMesh/libMesh.a lib/libMesh.a
97
113
98
- all-local :bin lib include lib/libMesh.a pkg $(DOWNLOADCOMPILE ) install-other
114
+ all-local :bin lib include lib/libMesh.a pkg $(DOWNLOADCOMPILE ) install-other
99
115
100
116
install-other : tag-install-other
101
117
102
118
tag-install-other :
103
- if test -n " $( TOOL_COMPILE_hpddm) " ; then $( MAKE) install-hpddm; else true ; fi
104
- if test -n " $( TOOL_COMPILE_htool) " ; then $( MAKE) install-htool; else true ; fi
105
- if test -n " $( TOOL_COMPILE_bem) " ; then $( MAKE) install-boost install-bemtool; else true ; fi
119
+ if test -n " $( TOOL_COMPILE_hpddm) " ; then $( MAKE) install-hpddm; else true ; fi
120
+ if test -n " $( TOOL_COMPILE_htool) " ; then $( MAKE) install-htool; else true ; fi
121
+ if test -n " $( TOOL_COMPILE_bem) " ; then $( MAKE) install-boost install-bemtool; else true ; fi
106
122
touch tag-install-other
107
123
108
124
WHERE-OTHER : lib/WHERE.hpddm lib/WHERE.htool lib/WHERE.bemtool lib/WHERE.boost
109
- WHERE-LD : tag-compile-pkg WHERE-OTHER
125
+ WHERE-LD : tag-compile-pkg WHERE-OTHER
110
126
touch ../plugin/seq/WHERE_LIBRARY-config ../plugin/seq/WHERE_LIBRARY
111
127
-grep LD ../plugin/seq/WHERE_LIBRARY ../plugin/seq/WHERE_LIBRARY-config > WHERE-LD
112
128
113
129
# BEGIN HPDDM
114
130
install-hpddm : ./getall
115
- if test -n " $( TOOL_COMPILE_hpddm) " ; then ./getall -o hpddm -a; $( MAKE) include/hpddm/done.tag lib/WHERE.hpddm; else true ; fi
116
- reinstall-hpddm :./getall
131
+ if test -n " $( TOOL_COMPILE_hpddm) " ; then ./getall -o hpddm -a; $( MAKE) include/hpddm/done.tag lib/WHERE.hpddm; else true ; fi
132
+ reinstall-hpddm : ./getall
117
133
-rm lib/WHERE.hpddm
118
134
-rm ./pkg/hpddm.zip
119
135
-rm -rf include/hpddm
120
136
-test -n " $( TOOL_COMPILE_hpddm) " && $(MAKE ) install-hpddm || true
121
- include/hpddm/done.tag :./pkg/hpddm.zip
137
+ include/hpddm/done.tag : ./pkg/hpddm.zip
122
138
-if test -f ./pkg/hpddm.zip ; then \
123
- cd include;rm -rf hpddm hpddm-*; unzip -q ../pkg/hpddm.zip ; mv hpddm-* hpddm ; touch hpddm/done.tag; \
124
- else true; fi
139
+ cd include; rm -rf hpddm hpddm-* ; unzip -q ../pkg/hpddm.zip; mv hpddm-* hpddm; touch hpddm/done.tag; \
140
+ else true ; fi
125
141
lib/WHERE.hpddm : ./getall
126
- if test -d include/hpddm/include ; then \
127
- echo hpddm LD -L@DIR@/lib > $@ ; \
128
- echo hpddm INCLUDE -I@DIR@/include/hpddm/include >> $@ ; \
129
- elif test -d include/hpddm/src ; then \
130
- echo hpddm LD -L@DIR@/lib > $@ ; \
131
- echo hpddm INCLUDE -I@DIR@/include/hpddm/src >> $@ ; \
132
- else true ; fi
142
+ if test -d include/hpddm/include; then \
143
+ echo hpddm LD -L@DIR@/lib > $@ ; \
144
+ echo hpddm INCLUDE -I@DIR@/include/hpddm/include >> $@ ; \
145
+ elif test -d include/hpddm/src; then \
146
+ echo hpddm LD -L@DIR@/lib > $@ ; \
147
+ echo hpddm INCLUDE -I@DIR@/include/hpddm/src >> $@ ; \
148
+ else true ; fi
133
149
# end HPDDM
134
150
135
151
# begin HTOOL
136
152
install-htool : ./getall
137
- if test -n " $( TOOL_COMPILE_htool) " ; then ./getall -o htool -a; $( MAKE) include/htool/done.tag lib/WHERE.htool; else true ; fi
138
- reinstall-htool :./getall
153
+ if test -n " $( TOOL_COMPILE_htool) " ; then ./getall -o htool -a; $( MAKE) include/htool/done.tag lib/WHERE.htool; else true ; fi
154
+ reinstall-htool : ./getall
139
155
-rm lib/WHERE.htool
140
156
-rm ./pkg/htool.zip
141
157
-rm -rf include/htool
142
158
-test -n " $( TOOL_COMPILE_htool) " && $(MAKE ) install-htool || true
143
- include/htool/done.tag :./pkg/htool.zip
144
- -if test -f ./pkg/htool.zip ; then \
145
- cd include;rm -rf htool htool-*; unzip -q ../pkg/htool.zip ; mv htool-* htool ; touch htool/done.tag; \
146
- else true; fi
159
+ include/htool/done.tag : ./pkg/htool.zip
160
+ -if test -f ./pkg/htool.zip; then \
161
+ cd include; rm -rf htool htool-* ; unzip -q ../pkg/htool.zip; mv htool-* htool; touch htool/done.tag; \
162
+ else true ; fi
147
163
lib/WHERE.htool : ./getall
148
- if test -d include/htool/include ; then \
149
- echo htool LD -L@DIR@/lib > $@ ; \
150
- echo htool INCLUDE -I@DIR@/include/htool/include >> $@ ; \
151
- else true ; fi
164
+ if test -d include/htool/include; then \
165
+ echo htool LD -L@DIR@/lib > $@ ; \
166
+ echo htool INCLUDE -I@DIR@/include/htool/include >> $@ ; \
167
+ else true ; fi
152
168
# end HTOOL
169
+
153
170
# begin BEMTOOL
154
171
install-bemtool : ./getall
155
- if test -n " $( TOOL_COMPILE_bem) " ; then ./getall -o bemtool -a; $( MAKE) include/bemtool /done.tag lib/WHERE.bemtool; else true ; fi
172
+ if test -n " $( TOOL_COMPILE_bem) " ; then ./getall -o bemtool -a; $( MAKE) include/BemTool /done.tag lib/WHERE.bemtool; else true ; fi
156
173
reinstall-bemtool :./getall
157
174
-rm lib/WHERE.bemtool
158
175
-rm ./pkg/bemtool.zip
159
176
-rm -rf include/BemTool
160
177
-test -n " $( TOOL_COMPILE_bem) " && $(MAKE ) install-bemtool || true
161
- include/bemtool /done.tag :./pkg/bemtool.zip
162
- -if test -f ./pkg/bemtool.zip ; then \
163
- cd include;rm -rf BemTool BemTool-*; unzip -q ../pkg/bemtool.zip ; mv BemTool-* BemTool ; touch BemTool/done.tag; \
164
- else true; fi
178
+ include/BemTool /done.tag : ./pkg/bemtool.zip
179
+ -if test -f ./pkg/bemtool.zip; then \
180
+ cd include; rm -rf BemTool BemTool-* ; unzip -q ../pkg/bemtool.zip; mv BemTool-* BemTool; touch BemTool/done.tag; \
181
+ else true ; fi
165
182
lib/WHERE.bemtool : ./getall
166
- if test -d include/BemTool/ ; then \
167
- echo bemtool LD -L@DIR@/lib > $@ ; \
168
- echo bemtool INCLUDE -I@DIR@/include/BemTool/ >> $@ ; \
169
- else true ; fi
183
+ if test -d include/BemTool/; then \
184
+ echo bemtool LD -L@DIR@/lib > $@ ; \
185
+ echo bemtool INCLUDE -I@DIR@/include/BemTool/ >> $@ ; \
186
+ else true ; fi
170
187
# end BEMTOOL
171
188
172
189
# begin BOOST
173
190
install-boost : ./getall
174
- if test -n " $( TOOL_COMPILE_bem) " ; then ./getall -o Boost -a; $( MAKE) boost/done.tag lib/WHERE.boost; else true ; fi
175
- reinstall-boost :./getall
191
+ if test -n " $( TOOL_COMPILE_bem) " ; then ./getall -o Boost -a; $( MAKE) boost/done.tag lib/WHERE.boost; else true ; fi
192
+ reinstall-boost : ./getall
176
193
-rm lib/WHERE.boost
177
194
-rm ./pkg/boost_for_bemtool.tar.gz
178
195
-rm -rf boost
179
196
-test -n " $( TOOL_COMPILE_bem) " && $(MAKE ) install-boost || true
180
- boost/done.tag :./pkg/boost_for_bemtool.tar.gz
181
- if test -f ./pkg/boost_for_bemtool.tar.gz ; then \
182
- rm -rf boost boost_* ; tar xzf pkg/boost_for_bemtool.tar.gz ; mv boost_for_bemtool boost; \
197
+ boost/done.tag : ./pkg/boost_for_bemtool.tar.gz
198
+ if test -f ./pkg/boost_for_bemtool.tar.gz; then \
199
+ rm -rf boost boost_* ; tar xzf pkg/boost_for_bemtool.tar.gz; mv boost_for_bemtool boost; \
183
200
else true ; fi
184
201
touch boost/done.tag
185
202
lib/WHERE.boost : ./getall
186
- if test -d boost/include ; then \
187
- echo boost INCLUDE -I@DIR@/boost/include >> $@ ; \
188
- else true ; fi
203
+ if test -d boost/include; then \
204
+ echo boost INCLUDE -I@DIR@/boost/include >> $@ ; \
205
+ else true ; fi
189
206
# end BOOST
190
207
191
- # to reinstall mpi under window afer clean
208
+ # to reinstall mpi under window afer clean
192
209
reinstall-msmpi :
193
- -if test -f " $$ MSMPI_INC" /mpif.h ; then \
194
- echo " copy msmpi in 3rdparty form $$ MSMPI_INC and $$ MSMPI_LIB64 or $$ MSMPI_LIB32" ; \
195
- mkdir -p include/msmpi ; \
196
- mkdir -p lib/msmpi ; \
197
- cp " $$ MSMPI_INC" /* .h include/msmpi ; \
198
- sed ' s/INT_PTR_KIND()/@SIZEOF_PTR@/' < " $$ MSMPI_INC" /mpif.h > include/msmpi/mpif.h ; \
199
- sed ' s/MPI_Status array_of_statuses\[\]/MPI_Status\* array_of_statuses/' < " $$ MSMPI_INC" /mpi.h > include/msmpi/mpi.h ; \
200
- grep KIND include/msmpi/mpif.h; \
201
- test " @SIZEOF_PTR@" -eq 8 && cp " $$ MSMPI_INC" /x64/* .h include/msmpi && cp " $$ MSMPI_LIB64" /* .lib lib/msmpi ; \
202
- test " @SIZEOF_PTR@" -eq 4 && cp " $$ MSMPI_INC" /x86/* .h include/msmpi && cp " $$ MSMPI_LIB32" /* .lib lib/msmpi ; \
210
+ -if test -f " $$ MSMPI_INC" /mpif.h; then \
211
+ echo " copy msmpi in 3rdparty form $$ MSMPI_INC and $$ MSMPI_LIB64 or $$ MSMPI_LIB32" ; \
212
+ mkdir -p include/msmpi; \
213
+ mkdir -p lib/msmpi; \
214
+ cp " $$ MSMPI_INC" /* .h include/msmpi; \
215
+ sed ' s/INT_PTR_KIND()/@SIZEOF_PTR@/' < " $$ MSMPI_INC" /mpif.h > include/msmpi/mpif.h; \
216
+ sed ' s/MPI_Status array_of_statuses\[\]/MPI_Status\* array_of_statuses/' < " $$ MSMPI_INC" /mpi.h > include/msmpi/mpi.h; \
217
+ grep KIND include/msmpi/mpif.h; \
218
+ test " @SIZEOF_PTR@" -eq 8 && cp " $$ MSMPI_INC" /x64/* .h include/msmpi && cp " $$ MSMPI_LIB64" /* .lib lib/msmpi; \
219
+ test " @SIZEOF_PTR@" -eq 4 && cp " $$ MSMPI_INC" /x86/* .h include/msmpi && cp " $$ MSMPI_LIB32" /* .lib lib/msmpi; \
203
220
fi
204
221
# FFCS: need to stop at the first error to make sure that all libraries are correctly compiled
205
222
compile-dir :
206
223
@echo " \n\n ****** $( COMPILEDIR) ****** \n\n" ;
207
- @if [ 0 -eq ` egrep ' :$(COMPILEDIR) *LD' WHERE-LD | wc -l` ] ; then \
208
- cd $(COMPILEDIR ) && $(MAKE ) $(DIRTARGET ) ; \
224
+ @if [ 0 -eq ` egrep ' :$(COMPILEDIR) *LD' WHERE-LD | wc -l` ]; then \
225
+ cd $(COMPILEDIR ) && $(MAKE ) $(DIRTARGET ) ; \
209
226
else \
210
- echo $(COMPILEDIR ) is in WHERE- files ; \
227
+ echo $(COMPILEDIR ) is in WHERE- files; \
211
228
fi
212
229
compile-pkg : tag-compile-pkg WHERE-LD
213
230
214
231
# FFCS: need to stop at the first error to make sure that all libraries are correctly compiled
215
232
tag-compile-pkg : bin lib include pkg FORCE
216
- @if [ -n " $( WGET) " ] ; then \
217
- for d in $( LIST_SOFT) ; do $( MAKE) compile-dir COMPILEDIR=$$ d || exit 1; done ; \
218
- if [ -n " $( MPICC) " ] ; then \
219
- for d in $( MPI_SOFT) ; do $( MAKE) compile-dir COMPILEDIR=$$ d || exit 1; done ; \
220
- fi ; fi
233
+ @if [ -n " $( WGET) " ]; then \
234
+ for d in $( LIST_SOFT) ; do $( MAKE) compile-dir COMPILEDIR=$$ d || exit 1; done ; \
235
+ if [ -n " $( MPICC) " ]; then \
236
+ for d in $( MPI_SOFT) ; do $( MAKE) compile-dir COMPILEDIR=$$ d || exit 1; done ; \
237
+ fi ; \
238
+ fi
221
239
$(MAKE ) install-hpddm install-htool install-bemtool install-boost
222
240
touch tag-compile-pkg
223
241
FORCE :
@@ -227,21 +245,21 @@ re-install:
227
245
WHERE :
228
246
$(MAKE ) compile-pkg DIRTARGET=WHERE
229
247
install-exec-local :
230
- $(mkinstalldirs ) -m 755 $(DESTDIR )$(ff_prefix_dir ) /lib
231
- $(mkinstalldirs ) -m 755 $(DESTDIR )$(ff_prefix_dir ) /bin
232
- $(mkinstalldirs ) -m 755 $(DESTDIR )$(ff_prefix_dir ) /include
233
- cp -rp lib $(DESTDIR )$(ff_prefix_dir )
234
- cp -rp include $(DESTDIR )$(ff_prefix_dir )
235
- cp -rp bin $(DESTDIR )$(ff_prefix_dir )
236
- -if test -f boost/done.tag ; then \
237
- $(mkinstalldirs ) -m 755 $(DESTDIR )$(ff_prefix_dir ) /boost ; \
238
- cp -rp boost $(DESTDIR )$(ff_prefix_dir ) ; \
248
+ $(mkinstalldirs ) -m 755 " $( DESTDIR) $( ff_prefix_dir) /lib"
249
+ $(mkinstalldirs ) -m 755 " $( DESTDIR) $( ff_prefix_dir) /bin"
250
+ $(mkinstalldirs ) -m 755 " $( DESTDIR) $( ff_prefix_dir) /include"
251
+ cp -rp lib " $( DESTDIR) $( ff_prefix_dir) "
252
+ cp -rp include " $( DESTDIR) $( ff_prefix_dir) "
253
+ cp -rp bin " $( DESTDIR) $( ff_prefix_dir) "
254
+ -if test -f boost/done.tag; then \
255
+ $(mkinstalldirs ) -m 755 " $( DESTDIR) $( ff_prefix_dir) /boost" ; \
256
+ cp -rp boost " $( DESTDIR) $( ff_prefix_dir) " ; \
239
257
fi
240
258
clean-local :
241
259
-rm -rf tag-* include lib bin WHERE-LD
242
- -mkdir include lib bin
260
+ -mkdir include lib bin
243
261
-rm * /FAIT * /FAIRE
244
262
# FFCS - make sure that all directories are cleaned. Thisis especially important under Windows because there is no
245
263
# compilation dependencies control there (see
246
264
# [[file:c:/cygwin/home/alh/ffcs/dist/configure.ac::dependency_tracking]])
247
- for d in $(LIST_SOFT) $(MPI_SOFT) ; do $(MAKE) clean -C $$d ; done
265
+ for d in $(LIST_SOFT) $(MPI_SOFT); do $(MAKE) clean -C $$d; done
0 commit comments