Debian Codegraph @

3rdparty/scotch/Makefile

raw
1 # ======================================================================
2 # Laboratoire Jacques-Louis Lions
3 # Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
4 # http://www.ljll.math.upmc.fr/lehyaric
5 # ======================================================================
6 # This file is part of Freefem++
7 #
8 # Freefem++ is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU Lesser General Public License as
10 # published by the Free Software Foundation; either version 2.1 of
11 # the License, or (at your option) any later version.
12 #
13 # Freefem++ is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Lesser General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with Freefem++; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 # ======================================================================
22 # headeralh default=0 freefem make multipleauthors start=19/03/10 upmc
23
24 # Downloading and compiling extra libraries
25 # -----------------------------------------
26
27 include Makefile.inc
28
29 all-local: scotch
30
31 # Downloading and compiling scotch
32 # -------------------------------
33 # https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.4.tar.gz
34 # http://gforge.inria.fr/frs/download.php/23391/scotch_5.1.7_esmumps.tar.gz
35 # Scotch information
36 DIRPKG=../pkg
37 SRCDIR=scotch-v$(scotch_VERSION)
38 PACKAGE=$(DIRPKG)/scotch-v$(scotch_VERSION_LOCAL).tar.gz
39 SERVER=https://gforge.inria.fr/frs/download.php/file/34099
40 #https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.4.tar.gz
41 #https://gforge.inria.fr/frs/download.php/23391
42 INSTALL=../..
43 scotch_VERSION=6.1.0
44 scotch_VERSION_LOCAL=6.1.0
45 # trick to no in MPI on NOT ..
46 NOTESTMPI= test -z "$(CCP)"
47 scotch: FAIRE
48
49 $(SRCDIR)/AFAIRE:
50 $(MAKE) install
51 $(NOTESTMPI) || $(MAKE) install-mpi
52
53 FAIRE: $(SRCDIR)/FAIT
54 $(MAKE) WHERE
55 $(NOTESTMPI) || $(MAKE) WHERE-mpi
56 touch FAIRE
57
58 Makefile.inc: ../../config.status Makefile-scotch.inc Makefile
59 ../../config.status --file="Makefile.inc:Makefile-scotch.inc"
60
61 # DCOMMON_TIMING_OLD
62 # FFCS - 16/1/13 - what was "$(CCP)" used for?
63 $(SRCDIR)/FAIT: $(SRCDIR) Makefile.inc
64 cp Makefile.inc $(SRCDIR)/src
65 cd $(SRCDIR)/src && $(MAKE) scotch esmumps
66 touch $(SRCDIR)/FAIT
67 $(SRCDIR)/FAIT-mpi: $(SRCDIR) Makefile.inc
68 cp Makefile.inc $(SRCDIR)/src
69 cd $(SRCDIR)/src && $(MAKE) -j1 ptscotch ptesmumps
70 touch $(SRCDIR)/FAIT-mpi
71
72 install:$(SRCDIR)/FAIT
73 mkdir -p $(SRCDIR)/$(INSTALL)/include/scotch
74 cp $(SRCDIR)/include/*.h $(SRCDIR)/$(INSTALL)/include/scotch/
75 cp $(SRCDIR)/lib/*.a $(SRCDIR)/$(INSTALL)/lib/
76 install-mpi:$(SRCDIR)/FAIT-mpi
77 mkdir -p $(SRCDIR)/$(INSTALL)/include/scotch
78 cp $(SRCDIR)/include/*.h $(SRCDIR)/$(INSTALL)/include/scotch/
79 cp $(SRCDIR)/lib/*.a $(SRCDIR)/$(INSTALL)/lib/
80
81 # ALH - 16/1/13 - simplifying make rules
82 WHERE:$(SRCDIR)/FAIT
83 $(MAKE) install
84 -rm $(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
85 echo scotch LD -L@DIR@/lib -lesmumps -lscotch -lscotcherr >>$(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
86 # echo scotchmetis LD -L@DIR@/lib -lscotchmetis >>$(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
87 echo scotch INCLUDE -I@DIR@/include/scotch >> $(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
88 WHERE-mpi:$(SRCDIR)/FAIT-mpi
89 $(MAKE) install-mpi
90 -rm $(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
91 echo ptscotch LD -L@DIR@/lib -lesmumps -lptscotch -lptscotcherr >>$(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
92 # echo ptscotchparmetis LD -L@DIR@/lib -lesmumps -lptscotchparmetis >>$(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
93 echo ptscotch INCLUDE -I@DIR@/include/scotch >> $(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
94 echo scotch LD -L@DIR@/lib -lesmumps -lscotch -lscotcherr >>$(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
95 # echo scotchmetis LD -L@DIR@/lib -lscotchmetis >>$(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
96 echo scotch INCLUDE -I@DIR@/include/scotch >> $(SRCDIR)/$(INSTALL)/lib/WHERE.scotch
97
98 $(SRCDIR): $(PACKAGE)
99 tar xzf $(PACKAGE)
100 touch $(SRCDIR)
101
102 $(PACKAGE):
103 ../getall -o Scotch -a
104
105 # FFCS - 28/3/13 - more cleaning
106 clean-local:
107 -cd $(SRCDIR)/src && $(MAKE) realclean -C $(SRCDIR)/src
108 -rm config.log
109 -rm -rf ../include/scotch/
110 -rm -rf ../lib/*scotch*
111 # FH -rm $(PACKAGE)
112
113 clean: clean-local
114 -rm Makefile.inc
115 -rm -rf $(SRCDIR)
116 -rm FAIRE
117 .PHONY:$(SRCDIR)/$(INSTALL)
118
119 # Local Variables:
120 # mode:makefile
121 # ispell-local-dictionary:"british"
122 # coding:utf-8
123 # End: