aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-09 11:32:37 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-09 11:32:37 +0200
commit83edd892b8b7e70f92cafd07713053a247327062 (patch)
tree25bf11561b1117dd69baab77f6a856a7e1e8f7c0
parent18c044de4271a18f01e4f3679b7eef9369f3f5d3 (diff)
Thorn.m: Move Makefile file generation to new CodeGenMakefile.m
-rw-r--r--Tools/CodeGen/CodeGenMakefile.m41
-rw-r--r--Tools/CodeGen/KrancThorn.m2
-rw-r--r--Tools/CodeGen/Thorn.m11
3 files changed, 42 insertions, 12 deletions
diff --git a/Tools/CodeGen/CodeGenMakefile.m b/Tools/CodeGen/CodeGenMakefile.m
new file mode 100644
index 0000000..975de4a
--- /dev/null
+++ b/Tools/CodeGen/CodeGenMakefile.m
@@ -0,0 +1,41 @@
+
+(* Copyright 2004-2013 Sascha Husa, Ian Hinder, Christiane Lechner
+
+ This file is part of Kranc.
+
+ Kranc is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Kranc is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Kranc; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*)
+
+BeginPackage[
+ "CodeGenMakefile`",
+ {"Errors`", "Helpers`", "Kranc`", "CodeGenKranc`"}];
+
+CreateMakefile::usage = "Create the content of the Cactus make.code.defn file.";
+
+Begin["`Private`"];
+
+(* ------------------------------------------------------------------------
+ Makefile
+ ------------------------------------------------------------------------ *)
+
+(* Return a CodeGen block representing a makefile which refers to the
+ list of filenames sourceFiles *)
+CreateMakefile[sourceFiles_] :=
+ {FileHeader["Makefile"],
+ "SRCS = ", Map[{#, " "} &, sourceFiles], "\n"};
+
+End[];
+
+EndPackage[];
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index 96dbcdd..5606b50 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -30,7 +30,7 @@ BeginPackage["KrancThorn`", {"CodeGen`", "Thorn`",
"CalculationFunction`", "Errors`", "Helpers`", "CactusBoundary`",
"KrancTensor`", "Param`", "Schedule`", "Interface`", "Kranc`", "Jacobian`",
"ConservationCalculation`", "CaKernel`", "Calculation`", "ParamCheck`",
- "OpenCL`", "CodeGenConfiguration`"}];
+ "OpenCL`", "CodeGenConfiguration`", "CodeGenMakefile`"}];
CreateKrancThorn::usage = "Construct a Kranc thorn";
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m
index 04891c7..cf6b1b4 100644
--- a/Tools/CodeGen/Thorn.m
+++ b/Tools/CodeGen/Thorn.m
@@ -29,7 +29,6 @@ BeginPackage["Thorn`", "CodeGen`", "CodeGenC`", "CodeGenCactus`", "CodeGenKranc`
(* These functions are externally visible, and comprise the public
interface to this package. *)
-CreateMakefile::usage = "Create the content of the Cactus make.code.defn file.";
CreateThorn::usage = "Create a general Cactus thorn from
a thorn specification structure";
CreateSymmetriesRegistrationSource::usage = "";
@@ -43,16 +42,6 @@ CreateStartupFile::usage = "";
Begin["`Private`"];
-(* ------------------------------------------------------------------------
- Makefile
- ------------------------------------------------------------------------ *)
-
-(* Return a CodeGen block representing a makefile which refers to the
- list of filenames sourceFiles *)
-CreateMakefile[sourceFiles_] :=
- {FileHeader["Makefile"],
- "SRCS = ", Map[{#, " "} &, sourceFiles], "\n"};
-
(* ------------------------------------------------------------------------
Setter