-
git-svn-id: https://lxsd.femto-st.fr/svn/fvn@76 b657c933-2333-4658-acf2-d3c7c2708721
Makefile
1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
include $(BTREE)/Make.inc
objects = fvnlib.o
modobjects = $(objects)
library = libfvn$(libext)
libso = libfvn$(soext)
ifeq ($(BUILDSO),y)
all: sub $(library) $(libso)
else
all: sub $(library)
endif
sub:
( cd fvn_common && make && make install )
( cd fvn_linear && make && make install )
( cd fvn_integ && make && make install )
( cd fvn_interpol && make && make install )
( cd fvn_sparse && make && make install )
( cd fvn_fnlib && make && make install )
( cd fvn_misc && make && make install )
clean:
rm -f {*.o,*.oo,*.ipo,*.a,*.mod,*.so}
( cd fvn_common && make clean )
( cd fvn_linear && make clean )
( cd fvn_integ && make clean )
( cd fvn_interpol && make clean )
( cd fvn_sparse && make clean )
( cd fvn_fnlib && make clean )
( cd fvn_misc && make clean)
install:
cp fvn.mod $(BTREE)/modules
cp $(library) $(BTREE)/lib
ifeq ($(BUILDSO),y)
cp $(libso) $(BTREE)/lib
endif
%.o: %.f90
$(F95) $(F95FLAGS) -c $< -o $@
# cette ligne est elle utile et nécessaire?
#$(objects):fvnlib.f90
$(library): $(objects) sub
$(AR) rcu $@ $(objects)
$(AR) ru $@ fvn_common/*.o
$(AR) ru $@ fvn_linear/*.o
$(AR) ru $@ fvn_integ/*.o
$(AR) ru $@ fvn_interpol/*.o
$(AR) ru $@ fvn_sparse/*.o
$(AR) ru $@ fvn_sparse/AMD/Lib/*.o
$(AR) ru $@ fvn_sparse/UMFPACK/Lib/*.o
$(AR) ru $@ fvn_fnlib/*.o
$(AR) ru $@ fvn_misc/*.o
$(RANLIB) $@
ifeq ($(BUILDSO),y)
$(libso): $(library)
ld -shared -soname $(libso) -o $(libso) --whole-archive $(library)
endif