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 Inline Diff
Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 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 | |||
objects = fvnlib.o | 5 | 8 | objects = fvnlib.o | |
9 | endif | |||
10 | modobjects = $(objects) | |||
11 | ||||
library = libfvn$(libext) | 6 | 12 | library = libfvn$(libext) | |
7 | 13 | |||
all: sub $(library) | 8 | 14 | all: sub $(library) | |
9 | 15 | |||
sub: | 10 | 16 | sub: | |
( cd fvn_common && make && make install ) | 11 | 17 | ( cd fvn_common && make && make install ) | |
( cd fvn_linear && make && make install ) | 12 | 18 | ( cd fvn_linear && make && make install ) | |
( cd fvn_integ && make && make install ) | 13 | 19 | ( cd fvn_integ && make && make install ) | |
( cd fvn_interpol && make && make install ) | 14 | 20 | ( cd fvn_interpol && make && make install ) | |
21 | ifndef SOPHIA | |||
( cd fvn_sparse && make && make install ) | 15 | 22 | ( cd fvn_sparse && make && make install ) | |
23 | endif | |||
( cd fvn_fnlib && make && make install ) | 16 | 24 | ( cd fvn_fnlib && make && make install ) | |
( cd fvn_misc && 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 | ||||
clean: | 20 | 43 | clean: | |
rm -f {*.o,*.oo,*.ipo,*.a,*.mod} | 21 | 44 | rm -f {*.o,*.oo,*.ipo,*.a,*.mod} | |
( cd fvn_common && make clean ) | 22 | 45 | ( cd fvn_common && make clean ) | |
( cd fvn_linear && make clean ) | 23 | 46 | ( cd fvn_linear && make clean ) | |
( cd fvn_integ && make clean ) | 24 | 47 | ( cd fvn_integ && make clean ) | |
( cd fvn_interpol && make clean ) | 25 | 48 | ( cd fvn_interpol && make clean ) | |
( cd fvn_sparse && make clean ) | 26 | 49 | ( cd fvn_sparse && make clean ) | |
( cd fvn_fnlib && make clean ) | 27 | 50 | ( cd fvn_fnlib && make clean ) | |
( cd fvn_misc && make clean) | 28 | 51 | ( cd fvn_misc && make clean) | |
29 | 52 | |||
install: | 30 | 53 | install: | |
cp fvn.mod $(BTREE)/modules | 31 | 54 | cp fvn.mod $(BTREE)/modules | |
cp $(library) $(BTREE)/lib | 32 | 55 | cp $(library) $(BTREE)/lib | |
33 | 56 | |||
%.o: %.f90 | 34 | 57 | %.o: %.f90 | |
$(F95) $(F95FLAGS) -c $< -o $@ | 35 | 58 | $(F95) $(F95FLAGS) -c $< -o $@ | |
36 | 59 | |||
$(objects):fvnlib.f90 | 37 | 60 | # cette ligne est elle utile et nécessaire? | |
61 | #$(objects):fvnlib.f90 | |||
38 | 62 | |||
$(library): $(objects) sub | 39 | 63 | $(library): $(objects) sub | |
$(AR) rcu $@ $(objects) | 40 | 64 | $(AR) rcu $@ $(objects) | |
$(AR) ru $@ fvn_common/*.o | 41 | 65 | $(AR) ru $@ fvn_common/*.o |
fvn_common/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
library = libfvn_common$(libext) | 4 | 4 | library = libfvn_common$(libext) | |
5 | 5 | |||
objects = fvn_common.o d1mach.o r1mach.o | 6 | 6 | objects = fvn_common.o d1mach.o r1mach.o | |
7 | 7 | |||
8 | modobjects = fvn_common.o | |||
9 | ||||
lib:$(objects) | 8 | 10 | lib:$(objects) | |
11 | ||||
12 | modules: $(modobjects) | |||
13 | rm -f $(modobjects) | |||
9 | 14 | |||
install: | 10 | 15 | install: | |
cp fvn_common.mod $(BTREE)/modules | 11 | 16 | cp fvn_common.mod $(BTREE)/modules | |
12 | 17 |
fvn_fnlib/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
objects = acosh.o aide.o aid.o aie.o \ | 4 | 4 | objects = acosh.o aide.o aid.o aie.o \ | |
ai.o albeta.o algams.o ali.o \ | 5 | 5 | ai.o albeta.o algams.o ali.o \ | |
alngam.o alnrel.o asinh.o atanh.o \ | 6 | 6 | alngam.o alnrel.o asinh.o atanh.o \ | |
besi0e.o besi0.o besi1e.o besi1.o \ | 7 | 7 | besi0e.o besi0.o besi1e.o besi1.o \ | |
besj0.o besj1.o besk0e.o besk0.o \ | 8 | 8 | besj0.o besj1.o besk0e.o besk0.o \ | |
besk1e.o besk1.o beskes.o besks.o \ | 9 | 9 | besk1e.o besk1.o beskes.o besks.o \ | |
besy0.o besy1.o betai.o beta.o \ | 10 | 10 | besy0.o besy1.o betai.o beta.o \ | |
bide.o bid.o bie.o binom.o \ | 11 | 11 | bide.o bid.o bie.o binom.o \ | |
bi.o c0lgmc.o c8lgmc.o c9lgmc.o \ | 12 | 12 | bi.o c0lgmc.o c8lgmc.o c9lgmc.o \ | |
c9ln2r.o cacosh.o cacos.o carg.o \ | 13 | 13 | c9ln2r.o cacosh.o cacos.o carg.o \ | |
casinh.o casin.o catan2.o catanh.o \ | 14 | 14 | casinh.o casin.o catan2.o catanh.o \ | |
catan.o cbeta.o cbrt.o ccbrt.o \ | 15 | 15 | catan.o cbeta.o cbrt.o ccbrt.o \ | |
ccosh.o ccot.o cexprl.o cgamma.o \ | 16 | 16 | ccosh.o ccot.o cexprl.o cgamma.o \ | |
cgamr.o chi.o chu.o cinh.o \ | 17 | 17 | cgamr.o chi.o chu.o cinh.o \ | |
cin.o ci.o clbeta.o clngam.o \ | 18 | 18 | cin.o ci.o clbeta.o clngam.o \ | |
clnrel.o clog10.o comp1.o comp2.o \ | 19 | 19 | clnrel.o clog10.o comp1.o comp2.o \ | |
comp3.o cosdg.o cot.o cpsi.o \ | 20 | 20 | comp3.o cosdg.o cot.o cpsi.o \ | |
csevl.o csinh.o ctanh.o ctan.o \ | 21 | 21 | csevl.o csinh.o ctanh.o ctan.o \ | |
d9admp.o d9aimp.o d9atn1.o \ | 22 | 22 | d9admp.o d9aimp.o d9atn1.o \ | |
d9b0mp.o d9b1mp.o d9chm.o d9chu.o \ | 23 | 23 | d9b0mp.o d9b1mp.o d9chm.o d9chu.o \ | |
d9gaml.o d9gmic.o d9gmit.o d9knus.o \ | 24 | 24 | d9gaml.o d9gmic.o d9gmit.o d9knus.o \ | |
d9lgic.o d9lgit.o d9lgmc.o d9ln2r.o \ | 25 | 25 | d9lgic.o d9lgit.o d9lgmc.o d9ln2r.o \ | |
d9pak.o d9sifg.o d9upak.o dacosh.o \ | 26 | 26 | d9pak.o d9sifg.o d9upak.o dacosh.o \ | |
daide.o daid.o daie.o dai.o \ | 27 | 27 | daide.o daid.o daie.o dai.o \ | |
dasinh.o datanh.o daws.o dbesi0.o \ | 28 | 28 | dasinh.o datanh.o daws.o dbesi0.o \ | |
dbesi1.o dbesj0.o dbesj1.o dbesk0.o \ | 29 | 29 | dbesi1.o dbesj0.o dbesj1.o dbesk0.o \ | |
dbesk1.o dbesks.o dbesy0.o dbesy1.o \ | 30 | 30 | dbesk1.o dbesks.o dbesy0.o dbesy1.o \ | |
dbetai.o dbeta.o dbide.o dbid.o \ | 31 | 31 | dbetai.o dbeta.o dbide.o dbid.o \ | |
dbie.o dbinom.o dbi.o dbsi0e.o \ | 32 | 32 | dbie.o dbinom.o dbi.o dbsi0e.o \ | |
dbsi1e.o dbsk0e.o dbsk1e.o dbskes.o \ | 33 | 33 | dbsi1e.o dbsk0e.o dbsk1e.o dbskes.o \ | |
dcbrt.o dchi.o dchu.o dcinh.o \ | 34 | 34 | dcbrt.o dchi.o dchu.o dcinh.o \ | |
dcin.o dci.o dcosdg.o dcot.o \ | 35 | 35 | dcin.o dci.o dcosdg.o dcot.o \ | |
dcsevl.o ddaws.o de1.o dei.o \ | 36 | 36 | dcsevl.o ddaws.o de1.o dei.o \ | |
derfc.o derf.o dexprl.o dfac.o \ | 37 | 37 | derfc.o derf.o dexprl.o dfac.o \ | |
dgamic.o dgami.o dgamit.o dgamma.o \ | 38 | 38 | dgamic.o dgami.o dgamit.o dgamma.o \ | |
dgamr.o dlbeta.o dlgams.o dli.o \ | 39 | 39 | dgamr.o dlbeta.o dlgams.o dli.o \ | |
dlngam.o dlnrel.o dpoch1.o dpoch.o \ | 40 | 40 | dlngam.o dlnrel.o dpoch1.o dpoch.o \ | |
dpsi.o dshi.o dsindg.o dsi.o \ | 41 | 41 | dpsi.o dshi.o dsindg.o dsi.o \ | |
dspenc.o e1.o e9rint.o ei.o \ | 42 | 42 | dspenc.o e1.o e9rint.o ei.o \ | |
entsrc.o eprint.o erfc.o erf.o \ | 43 | 43 | entsrc.o eprint.o erfc.o erf.o \ | |
erroff.o exprel.o fac.o fdump.o \ | 44 | 44 | erroff.o exprel.o fac.o fdump.o \ | |
fvn_fnlib.o gamic.o gami.o gamit.o \ | 45 | 45 | fvn_fnlib.o gamic.o gami.o gamit.o \ | |
gamma.o gamr.o i1mach.o i8save.o \ | 46 | 46 | gamma.o gamr.o i1mach.o i8save.o \ | |
initds.o inits.o nerror.o poch1.o \ | 47 | 47 | initds.o inits.o nerror.o poch1.o \ | |
poch.o psi.o r9admp.o \ | 48 | 48 | poch.o psi.o r9admp.o \ | |
r9aimp.o r9atn1.o r9chm.o r9chu.o \ | 49 | 49 | r9aimp.o r9atn1.o r9chm.o r9chu.o \ | |
r9gaml.o r9gmic.o r9gmit.o r9knus.o \ | 50 | 50 | r9gaml.o r9gmic.o r9gmit.o r9knus.o \ | |
r9lgic.o r9lgit.o r9lgmc.o r9ln2r.o \ | 51 | 51 | r9lgic.o r9lgit.o r9lgmc.o r9ln2r.o \ | |
r9pak.o r9sifg.o r9upak.o randgs.o \ | 52 | 52 | r9pak.o r9sifg.o r9upak.o randgs.o \ | |
rand.o random.o ranf.o retsrc.o \ | 53 | 53 | rand.o random.o ranf.o retsrc.o \ | |
s88fmt.o s9comp.o seterr.o seteru.o \ | 54 | 54 | s88fmt.o s9comp.o seterr.o seteru.o \ | |
shi.o sindg.o si.o spenc.o \ | 55 | 55 | shi.o sindg.o si.o spenc.o \ | |
z0lgmc.o z8lgmc.o z9lgmc.o z9ln2r.o \ | 56 | 56 | z0lgmc.o z8lgmc.o z9lgmc.o z9ln2r.o \ | |
zacosh.o zacos.o zarg.o zasinh.o \ | 57 | 57 | zacosh.o zacos.o zarg.o zasinh.o \ | |
zasin.o zatan2.o zatanh.o zatan.o \ | 58 | 58 | zasin.o zatan2.o zatanh.o zatan.o \ | |
zbeta.o zcbrt.o zcosh.o zcot.o \ | 59 | 59 | zbeta.o zcbrt.o zcosh.o zcot.o \ | |
zexprl.o zgamma.o zgamr.o zlbeta.o \ | 60 | 60 | zexprl.o zgamma.o zgamr.o zlbeta.o \ | |
zlngam.o zlnrel.o zlog10.o zpsi.o \ | 61 | 61 | zlngam.o zlnrel.o zlog10.o zpsi.o \ | |
zsinh.o ztanh.o ztan.o besyn.o \ | 62 | 62 | zsinh.o ztanh.o ztan.o besyn.o \ | |
besjn.o dbesyn.o dbesjn.o beskn.o \ | 63 | 63 | besjn.o dbesyn.o dbesjn.o beskn.o \ | |
besin.o dbeskn.o dbesin.o | 64 | 64 | besin.o dbeskn.o dbesin.o | |
65 | 65 | |||
66 | modobjects = fvn_fnlib.o | |||
67 | ||||
lib:$(objects) | 66 | 68 | lib:$(objects) | |
69 | ||||
70 | modules: $(modobjects) | |||
71 | rm -f $(modobjects) | |||
67 | 72 | |||
install: | 68 | 73 | install: | |
cp fvn_fnlib.mod $(BTREE)/modules | 69 | 74 | cp fvn_fnlib.mod $(BTREE)/modules | |
70 | 75 | |||
clean: | 71 | 76 | clean: |
fvn_integ/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
objects = fvn_integ.o | 4 | 4 | objects = fvn_integ.o | |
5 | modobjects = fvn_integ.o | |||
5 | 6 | |||
all: $(objects) | 6 | 7 | all: $(objects) | |
8 | ||||
9 | modules: $(modobjects) | |||
10 | rm -f $(modobjects) | |||
7 | 11 | |||
clean: | 8 | 12 | clean: | |
rm -f {*.o,*.oo,*.ipo,*.a,*.mod} | 9 | 13 | rm -f {*.o,*.oo,*.ipo,*.a,*.mod} | |
10 | 14 |
fvn_interpol/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
objects = fvn_interpol.o | 4 | 4 | objects = fvn_interpol.o | |
5 | modobjects = fvn_interpol.o | |||
5 | 6 | |||
lib:$(objects) | 6 | 7 | lib:$(objects) | |
8 | ||||
9 | modules: $(modobjects) | |||
10 | rm -f $(modobjects) | |||
7 | 11 | |||
install: | 8 | 12 | install: | |
cp fvn_interpol.mod $(BTREE)/modules | 9 | 13 | cp fvn_interpol.mod $(BTREE)/modules | |
10 | 14 | |||
clean: | 11 | 15 | clean: |
fvn_linear/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
objects = fvn_linear.o | 4 | 4 | objects = fvn_linear.o | |
5 | modobjects = fvn_linear.o | |||
5 | 6 | |||
lib:$(objects) | 6 | 7 | lib:$(objects) | |
8 | ||||
9 | modules: $(modobjects) | |||
10 | rm -f $(modobjects) | |||
7 | 11 | |||
install: | 8 | 12 | install: | |
cp fvn_linear.mod $(BTREE)/modules | 9 | 13 | cp fvn_linear.mod $(BTREE)/modules | |
10 | 14 | |||
clean: | 11 | 15 | clean: |
fvn_misc/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
objects = fvn_misc.o | 4 | 4 | objects = fvn_misc.o | |
5 | modobjects = fvn_misc.o | |||
5 | 6 | |||
lib:$(objects) | 6 | 7 | lib:$(objects) | |
8 | ||||
9 | modules: $(modobjects) | |||
10 | rm -f $(modobjects) | |||
7 | 11 | |||
install: | 8 | 12 | install: | |
cp fvn_misc.mod $(BTREE)/modules | 9 | 13 | cp fvn_misc.mod $(BTREE)/modules | |
10 | 14 | |||
clean: | 11 | 15 | clean: |
fvn_sparse/Makefile
1 | 1 | |||
include $(BTREE)/Make.inc | 2 | 2 | include $(BTREE)/Make.inc | |
3 | 3 | |||
objects = fvn_sparse.o umfpack_wrapper.o | 4 | 4 | objects = fvn_sparse.o umfpack_wrapper.o | |
5 | modobjects = fvn_sparse.o | |||
5 | 6 | |||
all: suitesparse $(objects) | 6 | 7 | all: suitesparse $(objects) | |
7 | 8 | |||
suitesparse: | 8 | 9 | suitesparse: | |
( cd UMFPACK && make ) | 9 | 10 | ( cd UMFPACK && make ) | |
11 | ||||
12 | modules: $(modobjects) | |||
13 | rm -f $(modobjects) | |||
10 | 14 | |||
clean: | 11 | 15 | clean: | |
( cd AMD && make clean ) | 12 | 16 | ( cd AMD && make clean ) | |
( cd UMFPACK && make clean ) | 13 | 17 | ( cd UMFPACK && make clean ) | |
rm -f {*.o,*.oo,*.ipo,*.a,*.mod} | 14 | 18 | rm -f {*.o,*.oo,*.ipo,*.a,*.mod} | |
15 | 19 |