From 65932f4707c6d22f9e9a4b334df318f1934400f5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 11 Feb 2002 09:01:31 +0000 Subject: [PATCH] Move object files into the /lib directory. git-svn-id: https://svn.dealii.org/trunk@5484 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/Makefile | 14 ++++----- deal.II/common/scripts/make_dependencies.pl | 14 ++++++--- deal.II/deal.II/Makefile | 33 ++++++++++----------- deal.II/lac/Makefile | 12 ++++---- 4 files changed, 38 insertions(+), 35 deletions(-) diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index 55aa90cb6c..db7e2cd1b0 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -11,7 +11,7 @@ D=.. # 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))) \ @@ -19,7 +19,7 @@ o-files-base2= $(filter-out %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 @@ -55,11 +55,11 @@ else MT = == endif -lib/go/%.go : +$(LIBDIR)/base/%.go : @echo =====base=============debug======$(MT)== $( lib/Makefile.dep diff --git a/deal.II/common/scripts/make_dependencies.pl b/deal.II/common/scripts/make_dependencies.pl index 9d37cdda19..17fe473b8c 100644 --- a/deal.II/common/scripts/make_dependencies.pl +++ b/deal.II/common/scripts/make_dependencies.pl @@ -3,7 +3,7 @@ #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 @@ -13,7 +13,7 @@ #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 @@ -38,6 +38,12 @@ while ($ARGV[0] =~ /^-I/) { } } +# get base path +$_ = shift; +/^-B(.*)/; +$basepath = $1; + + #fill list of files to be processed while ($ARGV[0]) { @input_files = (@input_files, shift); @@ -67,7 +73,7 @@ foreach $file (@input_files) { @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"; @@ -75,7 +81,7 @@ foreach $file (@input_files) { 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"; diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index 76ce98de06..f9a8091883 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -47,12 +47,12 @@ forward-declarations = $D/deal.II/include/grid/forward_declarations.h # 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) @@ -67,24 +67,24 @@ else 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 $@ @@ -153,13 +153,10 @@ $(LIBDIR)/libdeal_II_3d.so: $(o-files-3d) #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 diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index 536e86cda6..ab86b2f50b 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -10,11 +10,11 @@ D=.. # 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 @@ -30,10 +30,10 @@ else MT = == endif -lib/go/%.go : +$(LIBDIR)/lac/%.go : @echo =====lac==============debug======$(MT)== $( lib/Makefile.dep # include all the dependencies -- 2.39.5