Fix Makefiles for parallel make

master
Salvatore Filippone 3 years ago
parent 636239bdb8
commit bcc85e47fd

@ -1,30 +1,38 @@
include Make.inc
all: libd based precd kryld utild cbindd
all: dirs based precd kryld utild cbindd libd
@echo "====================================="
@echo "PSBLAS libraries Compilation Successful."
based: libd
dirs:
(if test ! -d lib ; then mkdir lib; fi)
(if test ! -d include ; then mkdir include; fi; $(INSTALL_DATA) Make.inc include/Make.inc.psblas)
(if test ! -d modules ; then mkdir modules; fi;)
precd: based
utild: based
kryld: precd
cbindd: precd kryld utild
cbindd: based precd kryld utild
libd:
(if test ! -d lib ; then mkdir lib; fi)
(if test ! -d include ; then mkdir include; fi; $(INSTALL_DATA) Make.inc include/Make.inc.psblas)
(if test ! -d modules ; then mkdir modules; fi;)
based:
libd: based precd kryld utild cbindd
$(MAKE) -C base lib
precd:
$(MAKE) -C prec lib
kryld:
$(MAKE) -C krylov lib
utild:
$(MAKE) -C util lib
$(MAKE) -C cbind lib
based:
$(MAKE) -C base objs
precd:
$(MAKE) -C prec objs
kryld:
$(MAKE) -C krylov objs
utild:
$(MAKE) -C util objs
cbindd:
$(MAKE) -C cbind lib
$(MAKE) -C cbind objs
install: all
mkdir -p $(INSTALL_INCLUDEDIR) &&\

@ -6,24 +6,31 @@ INCDIR=../include
MODDIR=../modules
LIBNAME=$(BASELIBNAME)
lib: mods sr cm in pb tl
objs: mods sr cm in pb tl
lib: objs
$(MAKE) -C modules lib LIBNAME=$(BASELIBNAME) F90="$(MPF90)" F90COPT="$(F90COPT) $(MPI_OPT)"
$(MAKE) -C serial lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C comm lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C internals lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C psblas lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C tools lib LIBNAME=$(BASELIBNAME)
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
sr cm in pb tl: mods
mods:
$(MAKE) -C modules lib LIBNAME=$(BASELIBNAME) F90="$(MPF90)" F90COPT="$(F90COPT) $(MPI_OPT)"
$(MAKE) -C modules objs LIBNAME=$(BASELIBNAME) F90="$(MPF90)" F90COPT="$(F90COPT) $(MPI_OPT)"
sr:
$(MAKE) -C serial lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C serial objs LIBNAME=$(BASELIBNAME)
cm:
$(MAKE) -C comm lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C comm objs LIBNAME=$(BASELIBNAME)
in:
$(MAKE) -C internals lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C internals objs LIBNAME=$(BASELIBNAME)
pb:
$(MAKE) -C psblas lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C psblas objs LIBNAME=$(BASELIBNAME)
tl:
$(MAKE) -C tools lib LIBNAME=$(BASELIBNAME)
$(MAKE) -C tools objs LIBNAME=$(BASELIBNAME)
clean:
($(MAKE) -C modules clean)

@ -27,12 +27,15 @@ INCDIR=..
MODDIR=../modules
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR)
lib: interns mpfobjs $(OBJS)
objs: interns mpfobjs $(OBJS)
lib: objs
$(MAKE) -C internals lib LIBNAME=$(LIBNAME)
$(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(OBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)
interns:
$(MAKE) -C internals lib
$(MAKE) -C internals objs
mpfobjs:
$(MAKE) $(MPFOBJS) FC="$(MPFC)"

@ -31,7 +31,8 @@ MODDIR=../../modules
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR)
CINCLUDES=-I.
lib: mpfobjs $(FOBJS) $(MPFOBJS)
objs: mpfobjs $(FOBJS) $(MPFOBJS)
lib: objs
$(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(MPFOBJS2) $(FOBJS) $(FOBJS2) $(COBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -16,7 +16,8 @@ MODDIR=../modules
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR)
CINCLUDES=-I.
lib: mpfobjs $(FOBJS) $(FOBJS2) $(COBJS) $(MPFOBJS2) $(MPFOBJS)
objs: mpfobjs $(FOBJS) $(FOBJS2) $(COBJS) $(MPFOBJS2) $(MPFOBJS)
lib: objs
$(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(MPFOBJS2) $(FOBJS) $(FOBJS2) $(COBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -108,15 +108,18 @@ UTIL_MODS = desc/psb_desc_const_mod.o desc/psb_indx_map_mod.o\
MODULES=$(BASIC_MODS) $(SERIAL_MODS) $(UTIL_MODS)
OBJS = error.o psb_base_mod.o $(EXTRA_COBJS) cutil.o
LIBDIR=..
MODDIR=../../modules
LIBDIR=../
CINCLUDES=-I.
FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG).
lib: $(LIBDIR)/$(LIBNAME)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(LIBDIR)
objs: $(MODULES) $(OBJS) $(MPFOBJS)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
$(LIBDIR)/$(LIBNAME): $(MODULES) $(OBJS) $(MPFOBJS)
lib: objs $(LIBDIR)/$(LIBNAME)
$(LIBDIR)/$(LIBNAME): objs
$(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(MPFOBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -24,7 +24,9 @@ MODDIR=../modules
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR)
lib: $(OBJS)
objs: $(OBJS)
lib: objs
$(AR) $(LIBDIR)/$(LIBNAME) $(OBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -20,18 +20,19 @@ INCDIR=..
MODDIR=../modules
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR)
lib: impld sortd lib1 $(FOBJS)
objs: impld sortd $(FOBJS)
lib: objs
$(MAKE) -C impl lib
$(MAKE) -C sort lib
$(AR) $(LIBDIR)/$(LIBNAME) $(FOBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)
#cood csrd jadd
lib1: $(FOBJS)
impld:
$(MAKE) -C impl lib
$(MAKE) -C impl objs
sortd:
$(MAKE) -C sort lib
$(MAKE) -C sort objs
clean:
/bin/rm -f $(FOBJS) *$(.mod)
($(MAKE) -C impl clean)

@ -36,9 +36,9 @@ LIBFILE=$(LIBDIR)/$(LIBNAME)
#
default: lib
objs: $(OBJS)
lib: $(OBJS)
lib: objs
$(AR) $(LIBDIR)/$(LIBNAME) $(OBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -27,9 +27,9 @@ LIBFILE=$(LIBDIR)/$(LIBNAME)
#
default: lib
objs: $(OBJS)
lib: $(OBJS)
lib: objs
$(AR) $(LIBDIR)/$(LIBNAME) $(OBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -40,7 +40,9 @@ INCDIR=..
MODDIR=../modules
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR) $(FIFLAG)$(MODDIR)
lib: mpfobjs $(FOBJS)
objs: mpfobjs $(FOBJS)
lib: objs
$(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(FOBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)

@ -6,20 +6,25 @@ INCDIR=../include
MODDIR=../modules/
LIBNAME=$(CBINDLIBNAME)
lib: based precd krylovd utild
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
objs: based precd krylovd utild
/bin/cp -p $(CPUPDFLAG) *.h $(INCDIR)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
lib: objs
cd base && $(MAKE) lib LIBNAME=$(LIBNAME)
cd prec && $(MAKE) lib LIBNAME=$(LIBNAME)
cd krylov && $(MAKE) lib LIBNAME=$(LIBNAME)
cd util && $(MAKE) lib LIBNAME=$(LIBNAME)
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
based:
cd base && $(MAKE) lib LIBNAME=$(LIBNAME)
cd base && $(MAKE) objs LIBNAME=$(LIBNAME)
precd: based
cd prec && $(MAKE) lib LIBNAME=$(LIBNAME)
cd prec && $(MAKE) objs LIBNAME=$(LIBNAME)
krylovd: based precd
cd krylov && $(MAKE) lib LIBNAME=$(LIBNAME)
cd krylov && $(MAKE) objs LIBNAME=$(LIBNAME)
utild: based
cd util && $(MAKE) lib LIBNAME=$(LIBNAME)
cd util && $(MAKE) objs LIBNAME=$(LIBNAME)
clean:
cd base && $(MAKE) clean

@ -27,10 +27,11 @@ OBJS=$(FOBJS) $(COBJS)
LIBNAME=$(CBINDLIBNAME)
lib: $(OBJS) $(CMOD)
objs: $(OBJS) $(CMOD)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
$(COBJS): $(CMOD)

@ -16,11 +16,12 @@ CMOD=psb_krylov_cbind.h
LIBNAME=$(CKRYLOVLIBNAME)
lib: $(OBJS) $(CMOD)
objs: $(OBJS) $(CMOD)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
psb_skrylov_cbind_mod.o psb_dkrylov_cbind_mod.o psb_ckrylov_cbind_mod.o psb_zkrylov_cbind_mod.o: psb_base_krylov_cbind_mod.o
veryclean: clean

@ -18,11 +18,12 @@ CMOD=psb_prec_cbind.h psb_c_sprec.h psb_c_dprec.h psb_c_cprec.h psb_c_zprec.h
LIBNAME=$(CPRECLIBNAME)
lib: $(OBJS) $(CMOD)
objs: $(OBJS) $(CMOD)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
psb_prec_cbind_mod.o: psb_sprec_cbind_mod.o psb_dprec_cbind_mod.o psb_cprec_cbind_mod.o psb_zprec_cbind_mod.o
veryclean: clean

@ -18,11 +18,12 @@ CMOD=psb_util_cbind.h psb_c_cutil.h psb_c_zutil.h psb_c_dutil.h psb_c_sutil.h
LIBNAME=$(CUTILLIBNAME)
lib: $(OBJS) $(CMOD)
objs: $(OBJS) $(CMOD)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p *$(.mod) $(CMOD) $(HERE)
psb_util_cbind_mod.o: psb_c_util_cbind_mod.o psb_d_util_cbind_mod.o psb_s_util_cbind_mod.o psb_z_util_cbind_mod.o
veryclean: clean

@ -26,11 +26,13 @@ LIBNAME=$(METHDLIBNAME)
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR)
lib: $(OBJS)
objs: $(OBJS)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
psb_s_krylov_conv_mod.o psb_c_krylov_conv_mod.o psb_d_krylov_conv_mod.o psb_z_krylov_conv_mod.o: psb_base_krylov_conv_mod.o

@ -28,14 +28,16 @@ COBJS=
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR)
OBJS=$(F90OBJS) $(COBJS) $(MPFOBJS) $(MODOBJS)
lib: $(OBJS) impld
objs: $(OBJS) impld
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
lib: objs
$(MAKE) -C impl lib
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
impld: $(OBJS)
$(MAKE) -C impl
$(MAKE) -C impl objs
$(OBJS): $(MODDIR)/$(BASEMODNAME)$(.mod)

@ -42,7 +42,8 @@ LIBNAME=$(PRECLIBNAME)
COBJS=
FINCLUDES=$(FMFLAG).. $(FMFLAG)$(MODDIR)
lib: $(OBJS)
objs: $(OBJS)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)

@ -29,11 +29,12 @@ LIBNAME=$(UTILLIBNAME)
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MODDIR)
objs: $(OBJS)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
lib: $(HERE)/$(LIBNAME)
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
$(HERE)/$(LIBNAME): $(OBJS)
$(HERE)/$(LIBNAME): objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)

Loading…
Cancel
Save