Permalink
Browse files

Initial commit.

  • Loading branch information...
0 parents commit 8ce68610905ca2ac234e7310c949ec769fdf0764 Thomas Løcke committed Apr 18, 2012
Showing with 136 additions and 0 deletions.
  1. +11 −0 .gitignore
  2. +1 −0 README
  3. +66 −0 basic.gpr
  4. +1 −0 build_debug/.gitignore
  5. +1 −0 build_production/.gitignore
  6. +30 −0 makefile
  7. +26 −0 src/basic.adb
@@ -0,0 +1,11 @@
+# Do not track build objects, except .gitignore
+build*/*
+!build*/.gitignore
+
+# Do not track stuff in exe, except .gitignore
+exe/*
+!exe/.gitignore
+
+# Do not track emacs temporary and backup files
+\#*#
+*~
@@ -0,0 +1 @@
+Basic Ada project structure.
@@ -0,0 +1,66 @@
+-------------------------------------------------------------------------------
+-- --
+-- Basic --
+-- --
+-- Basic Project File --
+-- --
+-- Copyright (C) 2012-, NAME --
+-- --
+-- This is free software; you can redistribute it and/or modify it --
+-- under terms of the GNU General Public License as published by the --
+-- Free Software Foundation; either version 3, or (at your option) any --
+-- later version. This library 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. --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-------------------------------------------------------------------------------
+
+project Basic is
+ type Build_Type is ("Debug", "Production");
+ Build : Build_Type := External ("BUILDTYPE", "Production");
+
+ Source_Options := ("src");
+ for Source_Dirs use Source_Options;
+
+ for Main use ("basic.adb");
+
+ for Exec_Dir use "exe";
+
+ case Build is
+ when "Production" =>
+ for Object_Dir use "build_production";
+ 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 "Production" =>
+ for Default_Switches ("Ada")
+ use ("-gnatwa",
+ "-gnaty3abcdefhiklmnoprstux",
+ "-Wall",
+ "-O2",
+ "-gnat05");
+ when "Debug" =>
+ for Default_Switches ("Ada")
+ use ("-gnatwa",
+ "-gnata",
+ "-gnatVa",
+ "-gnaty3abcdefhiklmnoprstux",
+ "-Wall",
+ "-O1",
+ "-gnat05",
+ "-g");
+
+ end case;
+ end Compiler;
+end Basic;
@@ -0,0 +1 @@
+# Empty on purpose. Keeps build_debug around on a fresh clone.
@@ -0,0 +1 @@
+# Empty on purpose. Keeps build_debug around on a fresh clone.
@@ -0,0 +1,30 @@
+###############################################################################
+# #
+# Basic #
+# #
+# makefile #
+# #
+# Copyright (C) 2012-, NAME #
+# #
+# This is free software; you can redistribute it and/or modify it #
+# under terms of the GNU General Public License as published by the #
+# Free Software Foundation; either version 3, or (at your option) any #
+# later version. This software 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 #
+# distributed with this software; see file COPYING3. If not, go #
+# to http://www.gnu.org/licenses for a complete copy of the license. #
+# #
+###############################################################################
+
+all:
+ gnatmake -P basic
+
+debug:
+ BUILDTYPE=Debug gnatmake -P basic
+
+clean:
+ gnatclean -P basic
+ BUILDTYPE=Debug gnatclean -P basic
@@ -0,0 +1,26 @@
+-------------------------------------------------------------------------------
+-- --
+-- Basic --
+-- --
+-- Copyright (C) 2012-, NAME --
+-- --
+-- This is free software; you can redistribute it and/or modify it --
+-- under terms of the GNU General Public License as published by the --
+-- Free Software Foundation; either version 3, or (at your option) any --
+-- later version. This library 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. --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-------------------------------------------------------------------------------
+
+with Ada.Text_IO;
+
+procedure Basic is
+ use Ada.Text_IO;
+begin
+ Put_Line ("Basic....");
+end Basic;

0 comments on commit 8ce6861

Please sign in to comment.