diff --git a/Makefile b/Makefile index 65053fa..c683626 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,14 @@ -include $(BTREE)/Make.inc +include $(BTREE)/Make.inc #définir dans Make.inc une variable sophia, et prévoir F95FLAGS ad hoc pour compil et modules +ifdef SOPHIA +objects = fvnlib_sophia.o +else objects = fvnlib.o +endif +modobjects = $(objects) + library = libfvn$(libext) all: sub $(library) @@ -12,10 +18,27 @@ sub: ( cd fvn_linear && make && make install ) ( cd fvn_integ && make && make install ) ( cd fvn_interpol && make && make install ) +ifndef SOPHIA ( cd fvn_sparse && make && make install ) +endif ( cd fvn_fnlib && make && make install ) ( cd fvn_misc && make && make install ) +submodules: +#builds only modules local to fvn: go to sub-project, build sub-project modules, transfer them back here +#if sub-project depend on another, it is built after, and its proper make searches modules here, not in the install tree + ( cd fvn_common && make modules && mv *.mod .. ) + ( cd fvn_linear && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) + ( cd fvn_integ && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) + ( cd fvn_interpol && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) +ifndef SOPHIA + ( cd fvn_sparse && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) +endif + ( cd fvn_fnlib && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) + ( cd fvn_misc && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) + +modules: submodules $(modobjects) + rm -f $(modobjects) clean: rm -f {*.o,*.oo,*.ipo,*.a,*.mod} @@ -34,7 +57,8 @@ install: %.o: %.f90 $(F95) $(F95FLAGS) -c $< -o $@ -$(objects):fvnlib.f90 +# cette ligne est elle utile et nécessaire? +#$(objects):fvnlib.f90 $(library): $(objects) sub $(AR) rcu $@ $(objects) diff --git a/fvn_common/Makefile b/fvn_common/Makefile index 24aa203..0917568 100644 --- a/fvn_common/Makefile +++ b/fvn_common/Makefile @@ -5,8 +5,13 @@ library = libfvn_common$(libext) objects = fvn_common.o d1mach.o r1mach.o +modobjects = fvn_common.o + lib:$(objects) +modules: $(modobjects) + rm -f $(modobjects) + install: cp fvn_common.mod $(BTREE)/modules @@ -19,8 +24,3 @@ clean: %.o: %.f $(F95) $(F95FLAGS) -c $< -o $@ - - - - - diff --git a/fvn_fnlib/Makefile b/fvn_fnlib/Makefile index 6228e71..d126e5d 100644 --- a/fvn_fnlib/Makefile +++ b/fvn_fnlib/Makefile @@ -63,8 +63,13 @@ zsinh.o ztanh.o ztan.o besyn.o \ besjn.o dbesyn.o dbesjn.o beskn.o \ besin.o dbeskn.o dbesin.o +modobjects = fvn_fnlib.o + lib:$(objects) +modules: $(modobjects) + rm -f $(modobjects) + install: cp fvn_fnlib.mod $(BTREE)/modules diff --git a/fvn_integ/Makefile b/fvn_integ/Makefile index eb1c9c8..5e079b1 100644 --- a/fvn_integ/Makefile +++ b/fvn_integ/Makefile @@ -2,9 +2,13 @@ include $(BTREE)/Make.inc objects = fvn_integ.o +modobjects = fvn_integ.o all: $(objects) +modules: $(modobjects) + rm -f $(modobjects) + clean: rm -f {*.o,*.oo,*.ipo,*.a,*.mod} diff --git a/fvn_interpol/Makefile b/fvn_interpol/Makefile index 96946a1..dd79c3e 100644 --- a/fvn_interpol/Makefile +++ b/fvn_interpol/Makefile @@ -2,9 +2,13 @@ include $(BTREE)/Make.inc objects = fvn_interpol.o +modobjects = fvn_interpol.o lib:$(objects) +modules: $(modobjects) + rm -f $(modobjects) + install: cp fvn_interpol.mod $(BTREE)/modules diff --git a/fvn_linear/Makefile b/fvn_linear/Makefile index 1307bb9..bbf5d5a 100644 --- a/fvn_linear/Makefile +++ b/fvn_linear/Makefile @@ -2,9 +2,13 @@ include $(BTREE)/Make.inc objects = fvn_linear.o +modobjects = fvn_linear.o lib:$(objects) +modules: $(modobjects) + rm -f $(modobjects) + install: cp fvn_linear.mod $(BTREE)/modules diff --git a/fvn_misc/Makefile b/fvn_misc/Makefile index d262d00..5d572e3 100644 --- a/fvn_misc/Makefile +++ b/fvn_misc/Makefile @@ -2,9 +2,13 @@ include $(BTREE)/Make.inc objects = fvn_misc.o +modobjects = fvn_misc.o lib:$(objects) +modules: $(modobjects) + rm -f $(modobjects) + install: cp fvn_misc.mod $(BTREE)/modules diff --git a/fvn_sparse/Makefile b/fvn_sparse/Makefile index a6f0294..f7e7e38 100644 --- a/fvn_sparse/Makefile +++ b/fvn_sparse/Makefile @@ -2,12 +2,16 @@ include $(BTREE)/Make.inc objects = fvn_sparse.o umfpack_wrapper.o +modobjects = fvn_sparse.o all: suitesparse $(objects) suitesparse: ( cd UMFPACK && make ) +modules: $(modobjects) + rm -f $(modobjects) + clean: ( cd AMD && make clean ) ( cd UMFPACK && make clean )