]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move object files into the /lib directory.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Feb 2002 09:01:31 +0000 (09:01 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Feb 2002 09:01:31 +0000 (09:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@5484 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/Makefile
deal.II/common/scripts/make_dependencies.pl
deal.II/deal.II/Makefile
deal.II/lac/Makefile

index 55aa90cb6c2d6936d08536f959ebce65eca20567..db7e2cd1b00d1cb6e6774478374376530cf814ba 100644 (file)
@@ -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)== $(<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 $@
@@ -98,7 +98,7 @@ $(LIBDIR)/libbase.g.so: $(forward-declarations) $(go-files)
 
 
 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
@@ -112,8 +112,8 @@ clean:
 #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
 
 
index 9d37cdda19dac9b10309a799f5c1acb042a4d60d..17fe473b8c98cf7910f7ab6504f045d3e5fcb1a8 100644 (file)
@@ -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";
index 76ce98de068a71a48fc1dc0e5767b7eeae4c8956..f9a8091883ffce2db04696b8da64c3617912611c 100644 (file)
@@ -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
index 536e86cda69e55f13e0800049bce6d825a5326c5..ab86b2f50bd54587eb5e504d650e5e990d9e927b 100644 (file)
@@ -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)== $(<F)
        @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-lib/o/%.o :
+$(LIBDIR)/lac/%.o :
        @echo =====lac==============optimized==$(MT)== $(<F)
        @$(CXX) $(CXXFLAGS.o) -c $< -o $@
 
@@ -71,7 +71,7 @@ $(LIBDIR)/liblac.g.so: $(forward-declarations) $(go-files)
 
 
 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
@@ -81,7 +81,7 @@ clean:
 #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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.