From d2aeeb9dae1cad6d93fb58bf1a56b656ac0d04d6 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 18 Apr 2020 17:59:36 +0200 Subject: [PATCH] Improve structure of Makefiles --- Makefile | 4 ++-- cbind/Makefile | 4 ++-- mlprec/Makefile | 4 ++-- mlprec/impl/Makefile | 16 ++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 24e08cc2..8e727371 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,9 @@ libdir: mlp: - cd mlprec && $(MAKE) all + $(MAKE) -C mlprec all cbnd: mlp - cd cbind && $(MAKE) all + $(MAKE) -C cbind all install: all mkdir -p $(INSTALL_LIBDIR) &&\ $(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR) diff --git a/cbind/Makefile b/cbind/Makefile index 663fda86..a7cc9917 100644 --- a/cbind/Makefile +++ b/cbind/Makefile @@ -15,11 +15,11 @@ lib: mlprecd mlprecd: - cd mlprec && $(MAKE) lib LIBNAME=$(LIBNAME) + $(MAKE) -C mlprec lib LIBNAME=$(LIBNAME) clean: - cd mlprec && $(MAKE) clean + $(MAKE) -C mlprec clean veryclean: clean diff --git a/mlprec/Makefile b/mlprec/Makefile index 7b5b3d24..76a4a699 100644 --- a/mlprec/Makefile +++ b/mlprec/Makefile @@ -55,7 +55,7 @@ LIBNAME=libmld_prec.a all: lib impld impld: $(OBJS) - cd impl && $(MAKE) + $(MAKE) -C impl lib: $(OBJS) impld $(AR) $(HERE)/$(LIBNAME) $(OBJS) @@ -172,4 +172,4 @@ clean: implclean /bin/rm -f $(OBJS) $(LOCAL_MODS) *$(.mod) implclean: - cd impl && $(MAKE) clean + $(MAKE) -C impl clean diff --git a/mlprec/impl/Makefile b/mlprec/impl/Makefile index 27842294..3a527d23 100644 --- a/mlprec/impl/Makefile +++ b/mlprec/impl/Makefile @@ -72,13 +72,13 @@ lib: $(OBJS) aggrd levd smoothd solvd $(RANLIB) $(HERE)/$(LIBNAME) aggrd: - cd aggregator && $(MAKE) + $(MAKE) -C aggregator levd: - cd level && $(MAKE) + $(MAKE) -C level smoothd: - cd smoother && $(MAKE) + $(MAKE) -C smoother solvd: - cd solver && $(MAKE) + $(MAKE) -C solver mpobjs: (make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)") @@ -91,10 +91,10 @@ clean: solvclean smoothclean levclean aggrclean /bin/rm -f $(OBJS) $(LOCAL_MODS) aggrclean: - cd aggregator && $(MAKE) clean + $(MAKE) -C aggregator clean levclean: - cd level && $(MAKE) clean + $(MAKE) -C level clean smoothclean: - cd smoother && $(MAKE) clean + $(MAKE) -C smoother clean solvclean: - cd solver && $(MAKE) clean + $(MAKE) -C solver clean