Commit f6479a913d418dbc96c2a642f499e3066db51b60

Authored by wdaniau
1 parent 4bd2122857

Added conditional build of shared libraries

git-svn-id: https://lxsd.femto-st.fr/svn/fvn@76 b657c933-2333-4658-acf2-d3c7c2708721

Showing 1 changed file with 16 additions and 1 deletions Inline Diff

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