]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Initial revision
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 Apr 1999 11:48:26 +0000 (11:48 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 Apr 1999 11:48:26 +0000 (11:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@1196 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/Make.global_options [new file with mode: 0644]
deal.II/common/Makefile.template [new file with mode: 0644]

diff --git a/deal.II/common/Make.global_options b/deal.II/common/Make.global_options
new file mode 100644 (file)
index 0000000..39b4197
--- /dev/null
@@ -0,0 +1,32 @@
+# $Id$
+# Copyright W. Bangerth, G. Kanschat, University of Heidelberg, 1998, 1999
+
+# This file uses the variable $D, which is the deal home directory,
+# that is, the parent directory of this directory.
+#
+# Please set $D to the right path before including this file!
+
+vpath %.a $D/base/lib
+vpath %.a $D/lac/lib
+vpath %.a $D/deal.II/lib
+
+CXX       = c++
+INCLUDE   = -I$D/deal.II/include -I$D/lac/include \
+            -I$D/base/include
+CXXFLAGS.g= -ansi -DDEBUG -ggdb -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-builtin\
+           -fno-vtable-thunks \
+            $(INCLUDE)
+CXXFLAGS.o= -O2 -Wuninitialized -ffast-math \
+            -felide-constructors -fnonnull-objects \
+           -fno-vtable-thunks \
+            $(INCLUDE)
+
+
+
+%.go : %.cc #Makefile
+       @echo =====debug========= $<
+       @$(CXX) $(flags) -c $< -o $@
+%.o : %.cc #Makefile
+       @echo =====optimized===== $<
+       @$(CXX) $(flags) -c $< -o $@
diff --git a/deal.II/common/Makefile.template b/deal.II/common/Makefile.template
new file mode 100644 (file)
index 0000000..5647da3
--- /dev/null
@@ -0,0 +1,97 @@
+############################################################
+# Directory with the DEAL distribution
+############################################################
+
+D = please/enter/here/path/to/newdeal
+
+
+############################################################
+# Include general settings for including DEAL libraries
+############################################################
+
+include $D/common/Make.global_options
+
+
+############################################################
+# Set debug-mode as a default
+############################################################
+
+debug-mode = on
+
+
+############################################################
+# Define library names
+############################################################
+
+libs   = -ldeal_II_2d -llac -lbase
+libs.g = -ldeal_II_2d.g -llac.g -lbase.g
+
+
+############################################################
+# Select compiler flags according to debug-mode
+############################################################
+
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g) $(CXXFLAGS)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS.o) $(CXXFLAGS)
+endif
+
+
+############################################################
+# Typical block for building a running program
+#
+# 1. provide a list of source files in ...-cc-files
+#
+# 2. generate the list of object files according to debug-mode
+#
+# 3. make executable
+#
+# 4. Explicit dependencies of object files (will be automatic soon)
+#
+############################################################
+
+target1-cc-files = t1.cc t2.cc t3.cc
+
+ifeq ($(debug-mode),on)
+target1-o-files = $(target1-cc-files:.cc=.go)
+else
+target1-o-files = $(target1-cc-files:.cc=.o)
+endif
+
+target1: $(target1-o-files) $(libraries)
+       $(CXX) $(flags) -o $@ $^
+
+############################################################
+# Continue with other targets if needed
+############################################################
+
+
+
+
+############################################################
+# Cleanup targets
+############################################################
+
+clean:
+       rm -f *.o *.go
+
+veryclean: clean
+       rm -f target1 *.inp *.gpl *.eps *.gnuplot
+
+############################################################
+# Automatic generation of dependencies
+############################################################
+
+all-cc-files = $(target1-cc-files) # $(target2-cc-files) ...
+
+Make.depend: $(all-cc-files)
+       @echo =====Dependecies=== Make.depend
+       @$(CXX) $(flags) $^ -M > $@
+       @perl -pi~ -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@
+
+include Make.depend

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.