From 453003f5f645d7131d60cbced38331be402a9a23 Mon Sep 17 00:00:00 2001 From: Michele Martone Date: Tue, 5 Apr 2011 17:13:05 +0000 Subject: [PATCH] mld2p4: fixing the makefiles so `make check` and `make` execute with no extra copies/compilation/archiving. --- Makefile | 3 +++ mlprec/Makefile | 8 +++++++- tests/pdegen/Makefile | 24 ++++++++++++++++++------ 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ecf9791a..f2b11aad 100644 --- a/Makefile +++ b/Makefile @@ -28,5 +28,8 @@ veryclean: (cd tests/fileread; make clean) (cd tests/pdegen; make clean) +check: all + make check -C tests/pdegen + clean: (cd mlprec; make clean) diff --git a/mlprec/Makefile b/mlprec/Makefile index 3aea7cfc..1bb42258 100644 --- a/mlprec/Makefile +++ b/mlprec/Makefile @@ -76,9 +76,15 @@ LIBMOD=mld_prec_mod$(.mod) LOCAL_MODS=$(MODOBJS:.o=$(.mod)) LIBNAME=libmld_prec.a -lib: $(OBJS) +lib: $(LIBDIR)/$(LIBNAME) + +$(LIBNAME): $(OBJS) $(AR) $(HERE)/$(LIBNAME) $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) + + +# flea: if libdir misses some .mod file, it won't be copied unless the .a file is missing too +$(LIBDIR)/$(LIBNAME): $(LIBNAME) /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) /bin/cp -p $(LIBMOD) $(LOCAL_MODS) mld_const.h $(LIBDIR) diff --git a/tests/pdegen/Makefile b/tests/pdegen/Makefile index e0f0ac07..1b0f3812 100644 --- a/tests/pdegen/Makefile +++ b/tests/pdegen/Makefile @@ -11,19 +11,31 @@ FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG). EXEDIR=./runs -all: ppde spde +all: $(EXEDIR)/spde $(EXEDIR)/ppde + +# FIXME: tp.c seems a ghost source ! +# $(EXEDIR)/tp + +check: all + cd $(EXEDIR) ; ./ppde < ppde.inp ppde: ppde.o data_input.o $(F90LINK) ppde.o data_input.o -o ppde $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS) - /bin/mv ppde $(EXEDIR) spde: spde.o data_input.o $(F90LINK) spde.o data_input.o -o spde $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS) - /bin/mv spde $(EXEDIR) -tp: tp.o data_input.o - $(F90LINK) tp.o data_input.o -o tp $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS) - /bin/mv tp $(EXEDIR) +#tp: tp.o data_input.o +# $(F90LINK) tp.o data_input.o -o tp $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS) + +#$(EXEDIR)/tp: tp +# /bin/cp tp $(EXEDIR) + +$(EXEDIR)/ppde: ppde + /bin/cp ppde $(EXEDIR) + +$(EXEDIR)/spde: spde + /bin/cp spde $(EXEDIR) ppde.o spde.o: data_input.o