From: Guido Kanschat Date: Tue, 16 Apr 2002 16:01:17 +0000 (+0000) Subject: New parallel make structure X-Git-Tag: v8.0.0~18177 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=633737b771e5639f71226a2c68f594ee832bec29;p=dealii.git New parallel make structure git-svn-id: https://svn.dealii.org/trunk@5671 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/Makefile b/deal.II/Makefile index 864f16493b..aee757dcb8 100644 --- a/deal.II/Makefile +++ b/deal.II/Makefile @@ -13,9 +13,12 @@ help: @echo "= =" @echo "= The following targets exist: =" @echo "= baseg lacg : debug libraries \"base\" and \"lac\" =" + @echo "= baseo laco : optimized libraries \"base\" and \"lac\" =" @echo "= base lac : debug and optimized libraries \"base\" and \"lac\" =" @echo "= 1dg 2dg 3dg: deal.II debug version for specified dimension =" + @echo "= 1do 2do 3do: deal.II optimized version for specified dimension =" @echo "= 1d 2d 3d : deal.II debug and optimized for specified dimension =" + @echo "= forward : forward_declarations.h for all libraries =" @echo "= =" @echo "= contrib : additional libraries in contrib, if there are any =" @echo "= =" @@ -35,15 +38,13 @@ help: baseg: cd $D/base ; $(MAKE) $(MAKEOPTIONS) libg -base: - cd $D/base ; $(MAKE) $(MAKEOPTIONS) libg +baseo: cd $D/base ; $(MAKE) $(MAKEOPTIONS) lib lacg: cd $D/lac ; $(MAKE) $(MAKEOPTIONS) libg -lac: - cd $D/lac ; $(MAKE) $(MAKEOPTIONS) libg +laco: cd $D/lac ; $(MAKE) $(MAKEOPTIONS) lib 1dg: @@ -55,48 +56,34 @@ lac: 3dg: cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3dg -1d: - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 1dg +1do: cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 1d -2d: - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 2dg +2do: cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 2d -3d: - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3dg +3do: cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3d +base: baseg baseo +lac: lacg laco +1d: 1dg 1do +2d: 2dg 2do +3d: 3dg 3do + +forward: + cd $D/base ; $(MAKE) $(MAKEOPTIONS) forward + cd $D/lac ; $(MAKE) $(MAKEOPTIONS) forward + cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) forward + $(LIBDIR): mkdir $@ baseg base lacg lac 1dg 1d 2dg 2d 3dg 3d all debug contrib : $(LIBDIR) -all: contrib - cd $D/base ; $(MAKE) $(MAKEOPTIONS) libg - cd $D/base ; $(MAKE) $(MAKEOPTIONS) lib - cd $D/lac ; $(MAKE) $(MAKEOPTIONS) libg - cd $D/lac ; $(MAKE) $(MAKEOPTIONS) lib - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 2dg - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 2d - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 1dg - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 1d - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3dg - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3d - -debug: contrib - cd $D/base ; $(MAKE) $(MAKEOPTIONS) libg - cd $D/lac ; $(MAKE) $(MAKEOPTIONS) libg - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 2dg - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 1dg - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3dg - -optimized: - cd $D/base ; $(MAKE) $(MAKEOPTIONS) libo - cd $D/lac ; $(MAKE) $(MAKEOPTIONS) libo - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 2d - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 1d - cd $D/deal.II ; $(MAKE) $(MAKEOPTIONS) 3d +all: contrib base lac 2d 1d 3d forward +debug: contrib baseg lacg 2dg 1dg 3dg forward +optimized: contrib baseo laco 2do 1do 3do forward contrib: cd $D/contrib ; $(MAKE) diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index 483f978c80..6cabf0cc9a 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -76,21 +76,22 @@ else libo: $(LIBDIR)/libbase.a endif +forward: $(forward-declarations) -$(LIBDIR)/libbase.a: $(forward-declarations) $(o-files) +$(LIBDIR)/libbase.a: $(o-files) @echo =====base=============optimized==$(MT)== Linking library: $(@F) @ar ru $@ $(o-files) -$(LIBDIR)/libbase.g.a: $(forward-declarations) $(go-files) +$(LIBDIR)/libbase.g.a: $(go-files) @echo =====base=============debug======$(MT)== Linking library: $(@F) @ar ru $@ $(go-files) -$(LIBDIR)/libbase.so: $(forward-declarations) $(o-files) +$(LIBDIR)/libbase.so: $(o-files) @echo =====base=============optimized==$(MT)== Linking library: $(@F) @$(CC) $(LDFLAGS) -shared -o $@ $(o-files) -$(LIBDIR)/libbase.g.so: $(forward-declarations) $(go-files) +$(LIBDIR)/libbase.g.so: $(go-files) @echo =====base=============debug======$(MT)== Linking library: $(@F) @$(CC) $(LDFLAGS) -shared -o $@ $(go-files) @@ -110,7 +111,7 @@ clean: #note that here we translate file names with data_out_base #to three file names with the dimension for which we compile #appended -Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile +Makefile.dep: $(cc-files) $(h-files) Makefile @echo ============================ Remaking Makefile @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) "-B\$$(LIBDIR)/base" $(cc-files) \ | $(PERL) -p -e 's!(.*/base/data_out_base)((.g)?.o)!$$1_1d$$2 $$1_2d$$2 $$1_3d$$2 $$1_4d$$2!g;' \ diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index 58fc4fa56b..ae0a9266de 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -32,13 +32,14 @@ else 3d : $(LIBDIR)/libdeal_II_3d.a endif - # create lists of file names cc-files = $(shell echo source/*/*.cc) h-files = $(sort $(shell echo include/*/*.h)) forward-declarations = $D/deal.II/include/grid/forward_declarations.h +forward: $(forward-declarations) + # strip subdirectories from cc file names, preprend a "lib/[g]o" # and change the suffix. We place the object files with or without @@ -151,7 +152,7 @@ $(LIBDIR)/libdeal_II_3d.so: $(o-files-3d) #one of the cc-/h-files changed. Make detects whether #to remake this file upon inclusion at the bottom #of this file. -Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile +Makefile.dep: $(cc-files) $(h-files) Makefile @echo ============================ Remaking Makefile @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) "-B\$$(LIBDIR)" $(cc-files) \ | $(PERL) -p -e 's!LIBDIR\)/(.*):!LIBDIR)/DIM_PLACEHOLDER/$$1:!g;' \ diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index a1bf983b75..e6bbde9dbf 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -49,22 +49,22 @@ else libo: $(LIBDIR)/liblac.a endif +forward: $(forward-declarations) - -$(LIBDIR)/liblac.a: $(forward-declarations) $(o-files) +$(LIBDIR)/liblac.a: $(o-files) @echo =====lac==============optimized==$(MT)== Linking library: $(@F) @ar ru $@ $(o-files) -$(LIBDIR)/liblac.g.a: $(forward-declarations) $(go-files) +$(LIBDIR)/liblac.g.a: $(go-files) @echo =====lac==============debug======$(MT)== Linking library: $(@F) @ar ru $@ $(go-files) -$(LIBDIR)/liblac.so: $(forward-declarations) $(o-files) +$(LIBDIR)/liblac.so: $(o-files) @echo =====lac==============optimized==$(MT)== Linking library: $(@F) @$(CC) $(LDFLAGS) -shared -o $@ $(o-files) -$(LIBDIR)/liblac.g.so: $(forward-declarations) $(go-files) +$(LIBDIR)/liblac.g.so: $(go-files) @echo =====lac==============debug======$(MT)== Linking library: $(@F) @$(CC) $(LDFLAGS) -shared -o $@ $(go-files) @@ -79,7 +79,7 @@ clean: #one of the cc-/h-files changed. Make detects whether #to remake this file upon inclusion at the bottom #of this file. -Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile +Makefile.dep: $(cc-files) $(h-files) Makefile @echo ============================ Remaking Makefile @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) "-B\$$(LIBDIR)/lac" $(cc-files) \ > Makefile.dep