fixing the makefiles so `make check` and `make` execute with no extra copies/compilation/archiving.
stopcriterion
Michele Martone 14 years ago
parent 1dcfbd403f
commit 453003f5f6

@ -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)

@ -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)

@ -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

Loading…
Cancel
Save