diff --git a/Makefile b/Makefile index 7bf6531b..b5499eb7 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ include Make.inc -all: objs lib - -objs: libdir amgp cbnd +all: mods objs lib +objs: libdir mods amgobjs cbnd +mods: libdir + cd amgprec && $(MAKE) mods lib: objs cd amgprec && $(MAKE) lib cd cbind && $(MAKE) lib @@ -15,10 +16,10 @@ libdir: (if test ! -d modules ; then mkdir modules; fi;) ($(INSTALL_DATA) Make.inc include/Make.inc.amg4psblas) - -amgp: +amgobjs: mods cd amgprec && $(MAKE) objs -cbnd: amgp + +cbnd: mods cd cbind && $(MAKE) objs install: all diff --git a/amgprec/Makefile b/amgprec/Makefile index 0bba6f29..fe38d8e8 100644 --- a/amgprec/Makefile +++ b/amgprec/Makefile @@ -58,23 +58,21 @@ MODOBJS=amg_base_prec_type.o amg_prec_type.o amg_prec_mod.o \ $(SMODOBJS) $(DMODOBJS) $(CMODOBJS) $(ZMODOBJS) -OBJS=$(MODOBJS) - LOCAL_MODS=$(MODOBJS:.o=$(.mod)) LIBNAME=libamg_prec.a -all: objs impld +all: mods objs impld -objs: $(OBJS) +mods: $(MODOBJS) /bin/cp -p amg_const.h amg_config.h $(INCDIR) /bin/cp -p *$(.mod) $(MODDIR) - -impld: objs +objs: mods impld +impld: mods cd impl && $(MAKE) -lib: $(OBJS) impld +lib: mods impld cd impl && $(MAKE) lib - $(AR) $(HERE)/$(LIBNAME) $(OBJS) + $(AR) $(HERE)/$(LIBNAME) $(MODOBJS) $(RANLIB) $(HERE)/$(LIBNAME) /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) @@ -221,7 +219,7 @@ veryclean: clean /bin/rm -f $(LIBNAME) clean: implclean - /bin/rm -f $(OBJS) $(LOCAL_MODS) *$(.mod) + /bin/rm -f $(MODOBJS) $(LOCAL_MODS) *$(.mod) implclean: cd impl && $(MAKE) clean