Fix Makefiles for parallel builds

fixmatch
Salvatore Filippone 3 years ago
parent e46f22a37c
commit c7edaaa7c5

@ -1,10 +1,13 @@
include Make.inc
all: library
all: objs lib
library: libdir amgp cbnd
#cbnd
objs: amgp cbnd
lib: libdir objs
cd amgprec && $(MAKE) lib
cd cbind && $(MAKE) lib
libdir:
(if test ! -d lib ; then mkdir lib; fi)
@ -14,9 +17,9 @@ libdir:
amgp:
$(MAKE) -C amgprec all
cd amgprec && $(MAKE) objs
cbnd: amgp
$(MAKE) -C cbind all
cd cbind && $(MAKE) objs
install: all
mkdir -p $(INSTALL_LIBDIR) &&\
$(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR)
@ -41,14 +44,14 @@ cleanlib:
(cd modules; /bin/rm -f *.a *$(.mod) *$(.fh))
veryclean: cleanlib
(cd amgprec; make veryclean)
(cd samples/simple/fileread; make clean)
(cd samples/simple/pdegen; make clean)
(cd samples/advanced/fileread; make clean)
(cd samples/advanced/pdegen; make clean)
(cd amgprec && $(MAKE) veryclean)
(cd samples/simple/fileread && $(MAKE) clean)
(cd samples/simple/pdegen && $(MAKE) clean)
(cd samples/advanced/fileread && $(MAKE) clean)
(cd samples/advanced/pdegen && $(MAKE) clean)
check: all
make check -C samples/advanced/pdegen
clean:
(cd amgprec; make clean)
(cd amgprec && $(MAKE) clean)

@ -62,12 +62,15 @@ OBJS=$(MODOBJS)
LOCAL_MODS=$(MODOBJS:.o=$(.mod))
LIBNAME=libamg_prec.a
all: lib impld
all: objs impld
impld: $(OBJS)
$(MAKE) -C impl
objs: $(OBJS)
impld: objs
cd impl && $(MAKE)
lib: $(OBJS) impld
cd impl && $(MAKE) lib
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
@ -218,4 +221,4 @@ clean: implclean
/bin/rm -f $(OBJS) $(LOCAL_MODS) *$(.mod)
implclean:
$(MAKE) -C impl clean
cd impl && $(MAKE) clean

@ -67,22 +67,25 @@ OBJS=$(F90OBJS) $(COBJS) $(MPCOBJS)
LIBNAME=libamg_prec.a
objs: $(OBJS) aggrd levd smoothd solvd
lib: $(OBJS) aggrd levd smoothd solvd
cd aggregator && $(MAKE) lib
cd level && $(MAKE) lib
cd smoother && $(MAKE) lib
cd solver && $(MAKE) lib
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
aggrd:
$(MAKE) -C aggregator
cd aggregator && $(MAKE) objs
levd:
$(MAKE) -C level
cd level && $(MAKE) objs
smoothd:
$(MAKE) -C smoother
cd smoother && $(MAKE) objs
solvd:
$(MAKE) -C solver
cd solver && $(MAKE) objs
mpobjs:
(make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)")
(make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)")
veryclean: clean
/bin/rm -f $(LIBNAME)
@ -91,10 +94,10 @@ clean: solvclean smoothclean levclean aggrclean
/bin/rm -f $(OBJS) $(LOCAL_MODS)
aggrclean:
$(MAKE) -C aggregator clean
cd aggregator && $(MAKE) clean
levclean:
$(MAKE) -C level clean
cd level && $(MAKE) clean
smoothclean:
$(MAKE) -C smoother clean
cd smoother && $(MAKE) clean
solvclean:
$(MAKE) -C solver clean
cd solver && $(MAKE) clean

@ -68,7 +68,9 @@ OBJS = $(FOBJS) $(MPCOBJS)
LIBNAME=libamg_prec.a
lib: $(OBJS)
objs: $(OBJS)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)

@ -72,14 +72,11 @@ amg_z_base_onelev_map_prol.o
LIBNAME=libamg_prec.a
lib: $(OBJS)
objs: $(OBJS)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
mpobjs:
(make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)")
(make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)")
veryclean: clean
/bin/rm -f $(LIBNAME)

@ -190,14 +190,12 @@ amg_z_l1_jac_smoother_clone.o \
LIBNAME=libamg_prec.a
lib: $(OBJS)
objs: $(OBJS)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
mpobjs:
(make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)")
(make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)")
veryclean: clean
/bin/rm -f $(LIBNAME)

@ -294,14 +294,12 @@ amg_z_krm_solver_impl.o
LIBNAME=libamg_prec.a
lib: $(OBJS)
objs: $(OBJS)
lib: objs
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
mpobjs:
(make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)")
(make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)")
veryclean: clean
/bin/rm -f $(LIBNAME)

@ -8,19 +8,19 @@ MODDIR=../modules/
LIBNAME=$(CBINDLIBNAME)
LIBNAME=libamg_cbind.a
all: lib
lib: amgprecd
objs: amgprecd
lib: objs
/bin/cp -p $(CPUPDFLAG) $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p $(CPUPDFLAG) *.h $(INCDIR)
/bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR)
amgprecd:
$(MAKE) -C amgprec lib LIBNAME=$(LIBNAME)
cd amgprec && $(MAKE) objs LIBNAME=$(LIBNAME)
clean:
$(MAKE) -C amgprec clean
cd amgprec &&$(MAKE) clean
veryclean: clean

@ -18,8 +18,9 @@ LIBMOD=amg_prec_cbind_mod$(.mod) amg_dprec_cbind_mod$(.mod) amg_zprec_cbind_mod$
LOCAL_MODS=$(LIBMOD)
#LIBNAME=$(CPRECLIBNAME)
objs: $(OBJS)
lib: $(OBJS) $(CMOD)
lib: objs $(CMOD)
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
/bin/cp -p $(HERE)/$(LIBNAME) $(DEST)

Loading…
Cancel
Save