2
0

client.gpr 2.1 KB

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