Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 62 lines (45 sloc) 1.703 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
with "aunit";
with "gnatcoll";
with "florist";

project Sting is
    -- Only two ways to build sting, as a debug build or a release build
    type Mode_Type is ("debug", "release", "test");
    -- If the mode is set in the environment, we'll use that, otherwise we'll
    -- just build a debug build by default
    Mode : Mode_Type := external ("mode", "debug");

    for Object_Dir use "obj/" & Mode;
    for Exec_Dir use "bin";
    for Main use ("main.adb", "test_runner.adb");
    for Source_Dirs use ("src", "test/**", "contrib/alog/src/**");


    package Builder is
        for Executable ("main.adb") use "stingd";
        for Default_Switches ("Ada") use ("-m", "-j2");
    end Builder;


    package Binder is
        for Default_Switches ("Ada") use ("-E", "-v");
    end Binder;


    package Compiler is
        Switches := ("-Wall", "-gnateS", "-gnatv", "-gnat2012");

        case Mode is
            when "test" =>
                for Switches ("Ada") use ("-g",
                                        "-fprofile-arcs",
                                        "-ftest-coverage",
                                        "-largs",
                                        "-fprofile-arcs") & Switches;
            when "debug" =>
                for Switches ("Ada") use ("-g") & Switches;

            when "release" =>
                for Switches ("Ada") use ("-O2") & Switches;
        end case;
    end Compiler;


    package Linker is
        case Mode is
            when "debug" | "test" =>
                for Switches ("Ada") use ("-fprofile-arcs");

            when "release" =>
                null;
        end case;
    end Linker;

end Sting;


-- vim: ft=ada ts=4 sw=4 et
Something went wrong with that request. Please try again.