]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Enable make to use more than one process when creating the libraries in these directo...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 6 May 1999 09:07:53 +0000 (09:07 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 6 May 1999 09:07:53 +0000 (09:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@1283 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/Makefile
deal.II/lac/source/Makefile

index 0378f77d328d3c37e39e154953e7575ca4effa58..d917203adfbe453d124b6ef507b8136ff9ba5f14 100644 (file)
@@ -3,8 +3,8 @@
 D=../..
 
 cc-files = $(wildcard *.cc)
-o-files  = $(cc-files:.cc=.o)
-go-files = $(cc-files:.cc=.go)
+o-files  = $(addprefix ../lib/o/, $(cc-files:.cc=.o))
+go-files = $(addprefix ../lib/o/, $(cc-files:.cc=.go))
 h-files  = $(wildcard ../include/*/*.h)
 
 forward-declarations = $D/base/include/base/forward-declarations.h
@@ -13,23 +13,25 @@ include $D/deal.II/Make.global_options
 
 
 
-%.go : %.cc Makefile
-       @echo ======== DEBUG =================== $<
+../lib/o/%.go :
+       @echo ============================ Compiling with debugging information:   $<
        @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-%.o : %.cc Makefile
-       @echo ======== OPTIMIZE ================ $<
+../lib/o/%.o :
+       @echo ============================ Compiling with optimization:   $<
        @$(CXX) $(CXXFLAGS) -c $< -o $@
 
 
-lib: lib.g.a lib.a
+lib: ../lib/libbase.g.a ../lib/libbase.a
 
 
-lib.a: $(forward-declarations) ../lib/libbase.a($(o-files))
+../lib/libbase.a: $(forward-declarations) $(o-files)
+       @ar ruv $@ $(o-files)
 
-lib.g.a: $(forward-declarations) ../lib/libbase.g.a($(go-files))
+../lib/libbase.g.a: $(forward-declarations) $(go-files)
+       @ar ruv $@ $(go-files)
 
 clean:
-       rm -f *.o *.go *~ Makefile.dep ../lib/lib*
+       rm -f ../lib/o/*.o ../lib/o/*.go *~ ../lib/Makefile.dep ../lib/lib*
 
 
 
@@ -48,6 +50,7 @@ clean:
 ifneq (1,${recursive-make-fwd-decl})
        @echo ============================ Remaking Makefile
        @perl ../Make_dep.pl ../lib/libbase $(INCLUDE) $(cc-files) \
+               | perl -p -e 's!^.*\((.*)\):!../lib/o/$$1:!g;' \
                > ../lib/Makefile.dep
 else
        @echo ============================ Not remaking Makefile since in nested mode
index f9d7608a1cfbe18fd21a7f89d64bae80e136459f..d59ead60edbdfbceeaf661a2cce7bcb8e1e5d72a 100644 (file)
@@ -3,8 +3,8 @@
 D=../..
 
 cc-files = $(wildcard *.cc)
-o-files  = $(cc-files:.cc=.o)
-go-files = $(cc-files:.cc=.go)
+o-files  = $(addprefix ../lib/o/, $(cc-files:.cc=.o))
+go-files = $(addprefix ../lib/o/, $(cc-files:.cc=.go))
 h-files  = $(wildcard ../include/*/*.h)
 
 forward-declarations = $D/lac/include/lac/forward-declarations.h
@@ -12,23 +12,25 @@ forward-declarations = $D/lac/include/lac/forward-declarations.h
 include $D/deal.II/Make.global_options
 
 
-%.go : %.cc Makefile
+../lib/o/%.go :
        @echo ============================ Compiling with debugging information:   $<
-       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-%.o : %.cc Makefile
+       $(CXX) $(CXXFLAGS.g) -c $< -o $@
+../lib/o/%.o :
        @echo ============================ Compiling with optimization:   $<
        @$(CXX) $(CXXFLAGS) -c $< -o $@
 
 
-lib: lib.g.a lib.a
+lib: ../lib/liblac.g.a ../lib/liblac.a
 
 
-lib.a: $(forward-declarations) ../lib/liblac.a($(o-files))
+../lib/liblac.a: $(forward-declarations) $(o-files)
+       @ar ruv $@ $(o-files)
 
-lib.g.a: $(forward-declarations) ../lib/liblac.g.a($(go-files))
+../lib/liblac.g.a: $(forward-declarations) $(go-files)
+       @ar ruv $@ $(go-files)
 
 clean:
-       rm -f *.o *.go *~ Makefile.dep ../lib/lib*
+       rm -f ../lib/o/*.o ../lib/o/*.go *~ Makefile.dep ../lib/lib*
 
 
 
@@ -48,7 +50,8 @@ clean:
 ../lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile
 ifneq (1,${recursive-make-fwd-decl})
        @echo ============================ Remaking Makefile
-       @perl ../Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files) \
+       @perl ../Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files)               \
+               | perl -p -e 's!^.*\((.*)\):!../lib/o/$$1:!g;' \
                > ../lib/Makefile.dep
 else
        @echo ============================ Not remaking Makefile since in nested mode

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.