]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Add GPR makefile
authorMichal Malý <madcatxster@devoid-pointer.net>
Sun, 16 Nov 2014 01:09:45 +0000 (02:09 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sun, 16 Nov 2014 01:09:45 +0000 (02:09 +0100)
nine_q.gpr [new file with mode: 0644]

diff --git a/nine_q.gpr b/nine_q.gpr
new file mode 100644 (file)
index 0000000..ece67dc
--- /dev/null
@@ -0,0 +1,51 @@
+with "/opt/gnat/lib/gnat/aws.gpr";
+--with "aws.gpr";
+
+project Nine_Q is
+  type Build_Type is ("Debug", "Release");
+
+  Build : Build_Type := External ("BUILDTYPE", "Debug");
+
+  Source_Options := ("src", "src/handlers", "src/problem_generators", "src/face_generators");
+  for Source_Dirs use Source_Options;
+  for Main use ("nine_q.adb");
+  for Exec_Dir use "bin";
+
+  case Build is
+    when "Release" =>
+      for Object_Dir use "build_release";
+    when "Debug" =>
+      for Object_Dir use "build_debug";
+  end case;
+  
+  package Ide is
+    for Compiler_Command ("ada") use "gnatmake";
+  end Ide;
+
+  package Compiler is
+    case Build is
+      when "Release" =>
+       for Default_Switches ("Ada") use ("-fstack-check",
+                                         "-gnata",
+                                         "-gnatf",
+                                         "-gnato",
+                                         "-gnatwa",
+                                         "-Wall",
+                                         "-O2",
+                                         "-gnat2012");
+
+    when "Debug" =>
+      for Default_Switches ("Ada") use ("-fstack-check",
+                                       "-gnata",
+                                       "-gnatf",
+                                       "-gnato",
+                                       "-gnatwa",
+                                       "-gnatVa",
+                                       "-Wall",
+                                       "-Og",
+                                       "-gnat2012",
+                                       "-g");
+    end case;
+  end Compiler;
+
+end Nine_Q;