@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 "= ="
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:
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)
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)
#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;' \
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
#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;' \
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)
#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