From 8dc7a13df9d82f5994991bea989f1b9e5fad7cbe Mon Sep 17 00:00:00 2001 From: Rainer Backofen <rainer.backofen@tu-dresden.de> Date: Thu, 29 Jul 2010 08:18:15 +0000 Subject: [PATCH] include possibility to store objects during make in a special directory OBJDIR, OBJDIR not defined in Makefile, then default is ./ --- AMDiS/other/include/Makefile_AMDiS.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/AMDiS/other/include/Makefile_AMDiS.mk b/AMDiS/other/include/Makefile_AMDiS.mk index 9950a2df..2f383561 100644 --- a/AMDiS/other/include/Makefile_AMDiS.mk +++ b/AMDiS/other/include/Makefile_AMDiS.mk @@ -115,7 +115,12 @@ ifeq ($(strip $(USE_OPENMP)), 1) endif endif - +# ============================================================================ +# ===== object directory ===================================================== +# ============================================================================ +ifeq ($(OBJDIR),) + OBJDIR=. +endif # ============================================================================ # ===== libtool linking ====================================================== # ============================================================================ @@ -136,11 +141,11 @@ all : make $(PROGRAMS) clean: - -rm -rf *.o + -rm -rf *.o $(OBJDIR)/*.o -rm -rf $(PROGRAMS) .cc.o: $*.cc - $(COMPILE) $(DEFS) $(INCLUDES) $(CPPFLAGS) -c -o $*.o $^ + $(COMPILE) $(DEFS) $(INCLUDES) $(CPPFLAGS) -c -o $(OBJDIR)/$*.o $^ -- GitLab