mirror of
https://github.com/AdaCore/win32ada.git
synced 2026-02-12 12:46:07 -08:00
126 lines
4.3 KiB
Plaintext
126 lines
4.3 KiB
Plaintext
------------------------------------------------------------------------------
|
|
-- Win32Ada --
|
|
-- --
|
|
-- Copyright (C) 2008-2012, AdaCore --
|
|
-- --
|
|
-- This library 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. --
|
|
-- --
|
|
-- 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. See the GNU --
|
|
-- General Public License for more details. --
|
|
-- --
|
|
-- You should have received a copy of the GNU General Public License --
|
|
-- along with this library; if not, write to the Free Software Foundation, --
|
|
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
|
|
-- --
|
|
-- As a special exception, if other files instantiate generics from this --
|
|
-- unit, or you link this unit with other files to produce an executable, --
|
|
-- this unit does not by itself cause the resulting executable to be --
|
|
-- covered by the GNU General Public License. This exception does not --
|
|
-- however invalidate any other reasons why the executable file might be --
|
|
-- covered by the GNU Public License. --
|
|
------------------------------------------------------------------------------
|
|
|
|
abstract project Shared is
|
|
|
|
for Source_Dirs use ();
|
|
|
|
Target := external ("TARGET");
|
|
|
|
type Win_Type is ("Win32", "Win64");
|
|
Win_Target : Win_Type := external ("PRJ_TARGET", "Win32");
|
|
|
|
type Build_Type is ("Debug", "Release");
|
|
Build : Build_Type := external ("PRJ_BUILD", "Debug");
|
|
|
|
--------------------------
|
|
-- Static / Relocatable --
|
|
--------------------------
|
|
|
|
type Library_Kind is ("relocatable", "static");
|
|
Library_Type : Library_Kind := external ("LIBRARY_TYPE", "static");
|
|
|
|
-----------------------
|
|
-- Build directories --
|
|
-----------------------
|
|
|
|
for Exec_Dir use ".build/" & Target;
|
|
|
|
case Build is
|
|
when "Debug" =>
|
|
for Exec_Dir use Project'Exec_Dir & "/debug";
|
|
when "Release" =>
|
|
for Exec_Dir use Project'Exec_Dir & "/release";
|
|
end case;
|
|
|
|
case Library_Type is
|
|
when "static" =>
|
|
for Exec_Dir use Project'Exec_Dir & "/static";
|
|
when "relocatable" =>
|
|
for Exec_Dir use Project'Exec_Dir & "/relocatable";
|
|
end case;
|
|
|
|
for Object_Dir use Project'Exec_Dir & "/obj";
|
|
for Library_Dir use Project'Exec_Dir & "/lib";
|
|
|
|
---------
|
|
-- Ide --
|
|
---------
|
|
|
|
type VCS_Type is ("Subversion", "Git");
|
|
VCS_Kind : VCS_Type := external ("PRJ_VCS", "Git");
|
|
|
|
package Ide is
|
|
for VCS_Kind use VCS_Kind;
|
|
for VCS_Log_Check
|
|
use "style_checker -l70 -H";
|
|
for VCS_File_Check
|
|
use "style_checker -ign out -ign tmplt -ign sed -ign txt"
|
|
& " -lang Ada -cp -cy -sp -gnat05"
|
|
& " -lang XML -l256";
|
|
end Ide;
|
|
|
|
Prep := "-gnateDTARGET=" & Win_Target;
|
|
|
|
--------------
|
|
-- Compiler --
|
|
--------------
|
|
|
|
package Compiler is
|
|
|
|
case Build is
|
|
when "Debug" =>
|
|
for Default_Switches ("Ada") use ("-g", "-gnatoy", "-gnatwae");
|
|
for Default_Switches ("C") use ("-g", "-Wno-int-to-pointer-cast");
|
|
|
|
when "Release" =>
|
|
for Default_Switches ("Ada") use ("-O2", "-gnatn");
|
|
end case;
|
|
|
|
for Default_Switches ("Ada")
|
|
use Compiler'Default_Switches ("Ada") & (Prep, "-gnateG");
|
|
|
|
end Compiler;
|
|
|
|
------------
|
|
-- Binder --
|
|
------------
|
|
|
|
package Binder is
|
|
for Default_Switches ("Ada") use ("-E");
|
|
end Binder;
|
|
|
|
-------------
|
|
-- Builder --
|
|
-------------
|
|
|
|
package Builder is
|
|
for Default_Switches ("Ada") use ("-m");
|
|
end Builder;
|
|
|
|
end Shared;
|