Salome HOME
Copyright update 2022
[tools/yacsgen.git] / Examples / ast1 / myaster / Makefile
1 # Copyright (C) 2009-2022  EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 include ../../makefile.inc
21
22 ASTER_INSTALL=$(ASTER_ROOT)/$(ASTER_VERSION)
23 ASTER_PUB=$(ASTER_ROOT)/public
24 ASTER_OUTILS=$(ASTER_ROOT)/outils
25
26 MUMPS=-L$(ASTER_PUB)/mumps-4.9.2/lib -ldmumps -lzmumps -lsmumps -lcmumps -lmumps_common -lpord -lmpiseq
27 METIS=-L$(ASTER_PUB)/metis-4.0/lib -lmetis
28
29
30 ASTER_LIBS = -L$(ASTER_INSTALL)/lib -laster \
31              $(MUMPS) $(METIS) \
32              -L$(MED2HOME)/lib -lmed \
33              -lferm -llapack -lhdf5
34
35 KERNEL_INCLUDES=-I$(KERNEL_ROOT_DIR)/include/salome
36 KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer \
37              -lSalomeDatastream -lSalomeDSCSupervBasic -Wl,--rpath -Wl,$(KERNEL_ROOT_DIR)/lib/salome
38
39 FC=gfortran
40 LD=gfortran
41 FFLAGS=-fopenmp -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
42 CC=gcc
43 SOURCES= src/op0078.f src/op0189.f src/op0181.f
44 OBJETS=op0078.o op0189.o op0181.o
45
46 CATAPY=catalo/ecrire_maillage.capy  catalo/lecture_force.capy catalo/yacs_init.capy
47
48 all:pyth cata astermodule
49
50 pyth:
51         cp -rf $(ASTER_INSTALL)/bibpyt .
52
53 cata: commande/cata.py 
54         cp -rf commande/cata.py* bibpyt/Cata
55
56 commande/cata.py:$(CATAPY)
57         ./make_cata $(ASTER_ROOT)/bin/as_run $(ASTER_VERSION)
58
59 astermodule:astermodule.so pyth
60         cp -rf astermodule.so bibpyt
61
62 op0078.o:src/op0078.f
63         $(FC) -c -fpic $(FFLAGS) $(KERNEL_INCLUDES) src/op0078.f
64 op0189.o:src/op0189.f
65         $(FC) -c -fpic $(FFLAGS) $(KERNEL_INCLUDES) src/op0189.f
66 op0181.o:src/op0181.f
67         $(FC) -c -fpic $(FFLAGS) $(KERNEL_INCLUDES) src/op0181.f
68 astermodule.so: $(OBJETS)
69         $(LD) -shared $(FFLAGS) -o $@ $(OBJETS) $(KERNEL_LIBS) $(ASTER_LIBS)
70 clean:
71         rm -rf *.o *.so bibpyt commande/cata.py* make-cmd commande