2
0

default.gpr 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 Compiler is
  21. for Switches ("C") use
  22. ("-DWOLFSSL_USER_SETTINGS", -- Use the user_settings.h file.
  23. "-Wno-pragmas",
  24. "-Wall",
  25. "-Wextra",
  26. "-Wunknown-pragmas",
  27. "--param=ssp-buffer-size=1",
  28. "-Waddress",
  29. "-Warray-bounds",
  30. "-Wbad-function-cast",
  31. "-Wchar-subscripts",
  32. "-Wcomment",
  33. "-Wfloat-equal",
  34. "-Wformat-security",
  35. "-Wformat=2",
  36. "-Wmaybe-uninitialized",
  37. "-Wmissing-field-initializers",
  38. "-Wmissing-noreturn",
  39. "-Wmissing-prototypes",
  40. "-Wnested-externs",
  41. "-Wnormalized=id",
  42. "-Woverride-init",
  43. "-Wpointer-arith",
  44. "-Wpointer-sign",
  45. "-Wshadow",
  46. "-Wsign-compare",
  47. "-Wstrict-overflow=1",
  48. "-Wstrict-prototypes",
  49. "-Wswitch-enum",
  50. "-Wundef",
  51. "-Wunused",
  52. "-Wunused-result",
  53. "-Wunused-variable",
  54. "-Wwrite-strings",
  55. "-fwrapv");
  56. for Switches ("Ada") use ("-g");
  57. end Compiler;
  58. package Linker is
  59. case OS is
  60. when "Windows" =>
  61. for Switches ("Ada") use
  62. ("-lm", -- To include the math library (used by WolfSSL).
  63. "-lcrypt32"); -- Needed on Windows.
  64. when "Linux_Or_Mac" =>
  65. for Switches ("Ada") use
  66. ("-lm"); -- To include the math library (used by WolfSSL).
  67. end case;
  68. end Linker;
  69. package Binder is
  70. for Switches ("Ada") use ("-Es"); -- To include stack traces.
  71. end Binder;
  72. end Default;