Commit 19e954a45ea46c43cbae54ed22c62d0446eff026
1 parent
1258bdafaf
Exists in
master
and in
3 other branches
ChW : added modules (and submodules) targets into makefiles
- this is presently used for builds in Sophia under SunStudio : - insert the following line into SunStudio Makefile as pre-build code ( export F95FLAGS=-m64 && export BTREE="$$(pwd)" && cd Sources && make modules && mv -f *.mod $$BTREE ) - insert .WAIT in the build prerequisites between .build-pre and .build-impl - create a file Make.inc in the root of the project containing at least F95=f95 - the project must contain the directory "Sources" which is at the same time the working directory of svn git-svn-id: https://lxsd.femto-st.fr/svn/fvn@51 b657c933-2333-4658-acf2-d3c7c2708721
Showing 8 changed files with 56 additions and 7 deletions Side-by-side Diff
Makefile
1 | 1 | |
2 | -include $(BTREE)/Make.inc | |
2 | +include $(BTREE)/Make.inc #définir dans Make.inc une variable sophia, et prévoir F95FLAGS ad hoc pour compil et modules | |
3 | 3 | |
4 | 4 | |
5 | +ifdef SOPHIA | |
6 | +objects = fvnlib_sophia.o | |
7 | +else | |
5 | 8 | objects = fvnlib.o |
9 | +endif | |
10 | +modobjects = $(objects) | |
11 | + | |
6 | 12 | library = libfvn$(libext) |
7 | 13 | |
8 | 14 | all: sub $(library) |
9 | 15 | |
10 | 16 | |
11 | 17 | |
... | ... | @@ -12,11 +18,28 @@ |
12 | 18 | ( cd fvn_linear && make && make install ) |
13 | 19 | ( cd fvn_integ && make && make install ) |
14 | 20 | ( cd fvn_interpol && make && make install ) |
21 | +ifndef SOPHIA | |
15 | 22 | ( cd fvn_sparse && make && make install ) |
23 | +endif | |
16 | 24 | ( cd fvn_fnlib && make && make install ) |
17 | 25 | ( cd fvn_misc && make && make install ) |
18 | 26 | |
27 | +submodules: | |
28 | +#builds only modules local to fvn: go to sub-project, build sub-project modules, transfer them back here | |
29 | +#if sub-project depend on another, it is built after, and its proper make searches modules here, not in the install tree | |
30 | + ( cd fvn_common && make modules && mv *.mod .. ) | |
31 | + ( cd fvn_linear && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) | |
32 | + ( cd fvn_integ && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) | |
33 | + ( cd fvn_interpol && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) | |
34 | +ifndef SOPHIA | |
35 | + ( cd fvn_sparse && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) | |
36 | +endif | |
37 | + ( cd fvn_fnlib && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) | |
38 | + ( cd fvn_misc && make modules F95FLAGS="$(F95FLAGS) -M.." && mv *.mod .. ) | |
19 | 39 | |
40 | +modules: submodules $(modobjects) | |
41 | + rm -f $(modobjects) | |
42 | + | |
20 | 43 | clean: |
21 | 44 | rm -f {*.o,*.oo,*.ipo,*.a,*.mod} |
22 | 45 | ( cd fvn_common && make clean ) |
... | ... | @@ -34,7 +57,8 @@ |
34 | 57 | %.o: %.f90 |
35 | 58 | $(F95) $(F95FLAGS) -c $< -o $@ |
36 | 59 | |
37 | -$(objects):fvnlib.f90 | |
60 | +# cette ligne est elle utile et nécessaire? | |
61 | +#$(objects):fvnlib.f90 | |
38 | 62 | |
39 | 63 | $(library): $(objects) sub |
40 | 64 | $(AR) rcu $@ $(objects) |
fvn_common/Makefile
fvn_fnlib/Makefile
fvn_integ/Makefile
fvn_interpol/Makefile
fvn_linear/Makefile
fvn_misc/Makefile
fvn_sparse/Makefile
... | ... | @@ -2,11 +2,15 @@ |
2 | 2 | include $(BTREE)/Make.inc |
3 | 3 | |
4 | 4 | objects = fvn_sparse.o umfpack_wrapper.o |
5 | +modobjects = fvn_sparse.o | |
5 | 6 | |
6 | 7 | all: suitesparse $(objects) |
7 | 8 | |
8 | 9 | suitesparse: |
9 | 10 | ( cd UMFPACK && make ) |
11 | + | |
12 | +modules: $(modobjects) | |
13 | + rm -f $(modobjects) | |
10 | 14 | |
11 | 15 | clean: |
12 | 16 | ( cd AMD && make clean ) |