default.gpr 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. project Default is
  2. type OS_Kind is ("Windows", "Linux_Or_Mac");
  3. OS : OS_Kind := external ("OS", "Linux_Or_Mac");
  4. for Languages use ("C", "Ada");
  5. for Source_Dirs use (".",
  6. "../../",
  7. "../../src",
  8. "../../wolfcrypt/src");
  9. -- Don't build the tls client application because it makes use
  10. -- of the Secondary Stack due to usage of the Ada.Command_Line
  11. -- package. All other Ada source code does not use the secondary stack.
  12. for Excluded_Source_Files use ("tls_client_main.adb",
  13. "tls_client.ads",
  14. "tls_client.adb");
  15. for Object_Dir use "obj";
  16. for Main use ("tls_server_main.adb");
  17. package Naming is
  18. for Spec_Suffix ("C") use ".h";
  19. end Naming;
  20. package Builder is
  21. for Global_Configuration_Pragmas use "gnat.adc";
  22. end Builder;
  23. package Compiler is
  24. for Switches ("C") use
  25. ("-DWOLFSSL_USER_SETTINGS", -- Use the user_settings.h file.
  26. "-Wno-pragmas",
  27. "-Wall",
  28. "-Wextra",
  29. "-Wunknown-pragmas",
  30. "--param=ssp-buffer-size=1",
  31. "-Waddress",
  32. "-Warray-bounds",
  33. "-Wbad-function-cast",
  34. "-Wchar-subscripts",
  35. "-Wcomment",
  36. "-Wfloat-equal",
  37. "-Wformat-security",
  38. "-Wformat=2",
  39. "-Wmaybe-uninitialized",
  40. "-Wmissing-field-initializers",
  41. "-Wmissing-noreturn",
  42. "-Wmissing-prototypes",
  43. "-Wnested-externs",
  44. "-Wnormalized=id",
  45. "-Woverride-init",
  46. "-Wpointer-arith",
  47. "-Wpointer-sign",
  48. "-Wshadow",
  49. "-Wsign-compare",
  50. "-Wstrict-overflow=1",
  51. "-Wstrict-prototypes",
  52. "-Wswitch-enum",
  53. "-Wundef",
  54. "-Wunused",
  55. "-Wunused-result",
  56. "-Wunused-variable",
  57. "-Wwrite-strings",
  58. "-fwrapv");
  59. for Switches ("Ada") use ("-g");
  60. end Compiler;
  61. package Linker is
  62. case OS is
  63. when "Windows" =>
  64. for Switches ("Ada") use
  65. ("-lm", -- To include the math library (used by WolfSSL).
  66. "-lcrypt32"); -- Needed on Windows.
  67. when "Linux_Or_Mac" =>
  68. for Switches ("Ada") use
  69. ("-lm"); -- To include the math library (used by WolfSSL).
  70. end case;
  71. end Linker;
  72. package Binder is
  73. for Switches ("Ada") use ("-Es"); -- To include stack traces.
  74. end Binder;
  75. end Default;