# files for data_out_base.cc, which is why we use the several
# intermediate o-files-base* rules
cc-files = $(shell echo source/*.cc)
-o-files-base1= $(addprefix lib/o/, $(patsubst source/%,%,$(cc-files:.cc=.o)))
+o-files-base1= $(addprefix $(LIBDIR)/base/, $(patsubst source/%,%,$(cc-files:.cc=.o)))
o-files-base2= $(filter-out %data_out_base.o, $(o-files-base1)) \
$(patsubst %.o,%_1d.o,$(filter %data_out_base.o, $(o-files-base1))) \
$(patsubst %.o,%_2d.o,$(filter %data_out_base.o, $(o-files-base1))) \
$(patsubst %.o,%_4d.o,$(filter %data_out_base.o, $(o-files-base1)))
o-files-base3= $(sort $(o-files-base2))
o-files = $(o-files-base3)
-go-files = $(patsubst lib/o/%,lib/go/%,$(o-files-base3:.o=.go))
+go-files = $(o-files-base3:.o=.go)
h-files = $(sort $(shell echo include/base/*.h))
forward-declarations = $D/base/include/base/forward_declarations.h
MT = ==
endif
-lib/go/%.go :
+$(LIBDIR)/base/%.go :
@echo =====base=============debug======$(MT)== $(<F) \
" " $(patsubst -Ddata_out_dimension=%,dimension=%,$(maybe-define-dimension))
@$(CXX) $(CXXFLAGS.g) $(maybe-define-dimension) -c $< -o $@
-lib/o/%.o :
+$(LIBDIR)/base/%.o :
@echo =====base=============optimized==$(MT)== $(<F) \
" " $(patsubst -Ddata_out_dimension=%,dimension=%,$(maybe-define-dimension))
@$(CXX) $(CXXFLAGS.o) $(maybe-define-dimension) -c $< -o $@
clean:
- -rm -f *~ include/*~ include/*/*~ lib/o/*.o lib/go/*.go lib/Makefile.dep
+ -rm -f *~ include/*~ include/*/*~ lib/Makefile.dep
#Rule to generate the dependency file. This file is
#appended
lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile
@echo ============================ Remaking Makefile
- @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) $(cc-files) \
- | $(PERL) -p -e 's!(lib/g?o/data_out_base)(.g?o)!$$1_1d$$2 $$1_2d$$2 $$1_3d$$2 $$1_4d$$2!g;' \
+ @$(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;' \
> lib/Makefile.dep
#Make a dependency file tree
-#usage: make_dep -Iinc_path1 -Iinc_path2 ... files
+#usage: make_dep -Iinc_path1 -Iinc_path2 ... -Bbasepath files
#This program makes for each of the given files a makefile dependency
#list, also considering nested includes. It only considers included
#lib/o/.o-file: file included_files
#lib/go/.go-file: file included_files
-#Author: Wolfgang Bangerth, 1998, 1999
+#Author: Wolfgang Bangerth, 1998, 1999, 2000, 2001, 2002
}
}
+# get base path
+$_ = shift;
+/^-B(.*)/;
+$basepath = $1;
+
+
#fill list of files to be processed
while ($ARGV[0]) {
@input_files = (@input_files, shift);
@include_file_list = sort (split (' ', $include_files{$file}));
# write rule for the .o file
- print "lib/o/$basename.o:";
+ print "$basepath/$basename.o:";
print "\\\n $file";
foreach $f (@include_file_list) {
print "\\\n $f";
print "\n";
# write rule for the .go file
- print "lib/go/$basename.go:";
+ print "$basepath/$basename.go:";
print "\\\n $file";
foreach $f (@include_file_list) {
print "\\\n $f";
# would be the same for both debug and non-debug versions, if we
# don't care about different directories
tmp1 = $(notdir $(cc-files))
-o-files-1d = $(addprefix lib/1d/o/, $(tmp1:.cc=_1d.o) )
-go-files-1d = $(addprefix lib/1d/go/, $(tmp1:.cc=_1d.go))
-o-files-2d = $(addprefix lib/2d/o/, $(tmp1:.cc=_2d.o) )
-go-files-2d = $(addprefix lib/2d/go/, $(tmp1:.cc=_2d.go))
-o-files-3d = $(addprefix lib/3d/o/, $(tmp1:.cc=_3d.o) )
-go-files-3d = $(addprefix lib/3d/go/, $(tmp1:.cc=_3d.go))
+o-files-1d = $(addprefix $(LIBDIR)/1d/, $(tmp1:.cc=_1d.o) )
+go-files-1d = $(addprefix $(LIBDIR)/1d/, $(tmp1:.cc=_1d.go))
+o-files-2d = $(addprefix $(LIBDIR)/2d/, $(tmp1:.cc=_2d.o) )
+go-files-2d = $(addprefix $(LIBDIR)/2d/, $(tmp1:.cc=_2d.go))
+o-files-3d = $(addprefix $(LIBDIR)/3d/, $(tmp1:.cc=_3d.o) )
+go-files-3d = $(addprefix $(LIBDIR)/3d/, $(tmp1:.cc=_3d.go))
o-files = $(o-files-1d) $(o-files-2d) $(o-files-3d)
go-files = $(go-files-1d) $(go-files-2d) $(go-files-3d)
MT = ==
endif
-lib/1d/go/%.go :
+$(LIBDIR)/1d/%.go :
@echo =====deal.II====1d====debug======$(MT)== $(<:source/%=%)
@$(CXX) $(CXXFLAGS.g) -Ddeal_II_dimension=1 -c $< -o $@
-lib/1d/o/%.o :
+$(LIBDIR)/1d/%.o :
@echo =====deal.II====1d====optimized==$(MT)== $(<:source/%=%)
@$(CXX) $(CXXFLAGS.o) -Ddeal_II_dimension=1 -c $< -o $@
-lib/2d/go/%.go :
+$(LIBDIR)/2d/%.go :
@echo =====deal.II====2d====debug======$(MT)== $(<:source/%=%)
@$(CXX) $(CXXFLAGS.g) -Ddeal_II_dimension=2 -c $< -o $@
-lib/2d/o/%.o :
+$(LIBDIR)/2d/%.o :
@echo =====deal.II====2d====optimized==$(MT)== $(<:source/%=%)
@$(CXX) $(CXXFLAGS.o) -Ddeal_II_dimension=2 -c $< -o $@
-lib/3d/go/%.go :
+$(LIBDIR)/3d/%.go :
@echo =====deal.II====3d====debug======$(MT)== $(<:source/%=%)
@$(CXX) $(CXXFLAGS.g) -Ddeal_II_dimension=3 -c $< -o $@
-lib/3d/o/%.o :
+$(LIBDIR)/3d/%.o :
@echo =====deal.II====3d====optimized==$(MT)== $(<:source/%=%)
@$(CXX) $(CXXFLAGS.o) -Ddeal_II_dimension=3 -c $< -o $@
#of this file.
lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile
@echo ============================ Remaking Makefile
- @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) $(cc-files) \
- | $(PERL) -p -e 's!^lib/(g?o/.*):!lib/DIM_PLACEHOLDER/$$1:!g;' \
+ @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) "-B\$$(LIBDIR)" $(cc-files) \
+ | $(PERL) -p -e 's!LIBDIR\)/(.*):!LIBDIR)/DIM_PLACEHOLDER/$$1:!g;' \
| $(PERL) -pe 's!(\.g?o):!_DIM_PLACEHOLDER$$1:!g;' \
- | $(PERL) -pe 's!^lib/DIM_PLACEHOLDER/(.*):!lib/1d/$$1 lib/2d/$$1 lib/3d/$$1:!g;'\
- | $(PERL) -pe 's!(lib/1d/[^ ]+)_DIM_PLACEHOLDER!$$1_1d!g;' \
- | $(PERL) -pe 's!(lib/2d/[^ ]+)_DIM_PLACEHOLDER!$$1_2d!g;' \
- | $(PERL) -pe 's!(lib/3d/[^ ]+)_DIM_PLACEHOLDER!$$1_3d!g;' \
+ | $(PERL) -pe 's!^(.*)/DIM_PLACEHOLDER/(.*)_DIM_PLACEHOLDER(\..*):!$$1/1d/$$2_1d$$3 $$1/2d/$$2_2d$$3 $$1/3d/$$2_3d$$3:!g;'\
> lib/Makefile.dep
# include all the dependencies
# files for data_out_base.cc, which is why we use the several
# intermediate o-files-base* rules
cc-files = $(shell echo source/*.cc)
-o-files-base1= $(addprefix lib/o/, $(patsubst source/%,%,$(cc-files:.cc=.o)))
+o-files-base1= $(addprefix $(LIBDIR)/lac/, $(patsubst source/%,%,$(cc-files:.cc=.o)))
o-files-base2= $(filter-out %data_out_base.o, $(o-files-base1))
o-files-base3= $(sort $(o-files-base2))
o-files = $(o-files-base3)
-go-files = $(patsubst lib/o/%,lib/go/%,$(o-files-base3:.o=.go))
+go-files = $(o-files-base3:.o=.go)
h-files = $(sort $(shell echo include/lac/*.h))
forward-declarations = $D/lac/include/lac/forward_declarations.h
MT = ==
endif
-lib/go/%.go :
+$(LIBDIR)/lac/%.go :
@echo =====lac==============debug======$(MT)== $(<F)
@$(CXX) $(CXXFLAGS.g) -c $< -o $@
-lib/o/%.o :
+$(LIBDIR)/lac/%.o :
@echo =====lac==============optimized==$(MT)== $(<F)
@$(CXX) $(CXXFLAGS.o) -c $< -o $@
clean:
- -rm -f *~ include/*~ include/*/*~ lib/o/*.o lib/go/*.go lib/Makefile.dep
+ -rm -f *~ include/*~ include/*/*~ lib/Makefile.dep
#Rule to generate the dependency file. This file is
#of this file.
lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile
@echo ============================ Remaking Makefile
- @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) $(cc-files) \
+ @$(PERL) $D/common/scripts/make_dependencies.pl $(INCLUDE) "-B\$$(LIBDIR)/lac" $(cc-files) \
> lib/Makefile.dep
# include all the dependencies