udp_genesis 1
udp_genesis 2
udp_genesis 3
udp_genesis 4
udp_genesis 5
udp_genesis 6
udp_genesis 7
udp_genesis 8
udp_genesis 9
udp_genesis 10
udp_genesis 11
udp_genesis 12
udp_genesis 13
udp_genesis 14
udp_genesis 15
udp_genesis 16
udp_genesis 17
udp_genesis 18
udp_genesis 19
udp_genesis 20 project UDP is
udp_genesis 21
udp_genesis 22 for Object_Dir use "obj";
udp_genesis 23
udp_genesis 24 type Mode_Type is ("debug", "release");
udp_genesis 25 Mode : Mode_Type := external ("mode", "release");
udp_genesis 26
udp_genesis 27 for Languages use ("Ada", "C");
udp_genesis 28 for Source_Dirs use (".");
udp_genesis 29 for Library_Dir use "lib";
udp_genesis 30 for Library_Name use "UDP";
udp_genesis 31 for Library_Kind use "static";
udp_genesis 32
udp_genesis 33 package Compiler is
udp_genesis 34 for Leading_Required_Switches ("C") use ("-c");
udp_genesis 35 for Object_File_Suffix ("C") use ".o";
udp_genesis 36 for Include_Switches ("C") use ("-I");
udp_genesis 37
udp_genesis 38 case Mode is
udp_genesis 39 when "debug" =>
udp_genesis 40 for Switches ("Ada")
udp_genesis 41 use ("-g");
udp_genesis 42 when "release" =>
udp_genesis 43 for Switches ("Ada")
udp_genesis 44 use ("-O2", "-fdump-scos", "-gnata", "-fstack-check",
udp_genesis 45 "-gnatyd", "-gnatym",
udp_genesis 46 "-fdata-sections", "-ffunction-sections", "-gnatwr", "-gnatw.d",
udp_genesis 47 "-gnatec=" & UDP'Project_Dir & "restrict.adc");
udp_genesis 48 for Switches ("C")
udp_genesis 49 use ("-O2", "-Wall", "-fstack-check");
udp_genesis 50 end case;
udp_genesis 51 end Compiler;
udp_genesis 52
udp_genesis 53 package Naming is
udp_genesis 54 for Spec_Suffix ("C") use ".h";
udp_genesis 55 for Body_Suffix ("C") use ".c";
udp_genesis 56 end Naming;
udp_genesis 57
udp_genesis 58 package Builder is
udp_genesis 59 for Switches ("Ada")
udp_genesis 60 use ("-nostdlib");
udp_genesis 61 end Builder;
udp_genesis 62
udp_genesis 63 package Binder is
udp_genesis 64 case Mode is
udp_genesis 65 when "debug" =>
udp_genesis 66 for Switches ("Ada")
udp_genesis 67 use ();
udp_genesis 68 when "release" =>
udp_genesis 69 for Switches ("Ada")
udp_genesis 70 use ("-static");
udp_genesis 71 end case;
udp_genesis 72 end Binder;
udp_genesis 73
udp_genesis 74 end UDP;