1
0

wolfssl.gpr 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. library project WolfSSL is
  2. for Library_Name use "wolfssl";
  3. -- for Library_Version use Project'Library_Name & ".so";
  4. type OS_Kind is ("Windows", "Linux_Or_Mac");
  5. OS : OS_Kind := external ("OS", "Linux_Or_Mac");
  6. for Languages use ("C", "Ada");
  7. for Source_Dirs use (".",
  8. "../../",
  9. "../../src",
  10. "../../wolfcrypt/src");
  11. -- Don't build the tls client or server application.
  12. -- They are not needed in order to build the library.
  13. for Excluded_Source_Files use ("tls_client_main.adb",
  14. "tls_client.ads",
  15. "tls_client.adb",
  16. "tls_server_main.adb",
  17. "tls_server.ads",
  18. "tls_server.adb");
  19. for Object_Dir use "obj";
  20. for Library_Dir use "lib";
  21. for Create_Missing_Dirs use "True";
  22. type Library_Type_Type is ("relocatable", "static", "static-pic");
  23. Library_Type : Library_Type_Type := external("LIBRARY_TYPE", "static");
  24. for Library_Kind use Library_Type;
  25. package Naming is
  26. for Spec_Suffix ("C") use ".h";
  27. end Naming;
  28. package Builder is
  29. for Global_Configuration_Pragmas use "gnat.adc";
  30. end Builder;
  31. package Compiler is
  32. for Switches ("C") use
  33. ("-DWOLFSSL_USER_SETTINGS", -- Use the user_settings.h file.
  34. "-Wno-pragmas",
  35. "-Wall",
  36. "-Wextra",
  37. "-Wunknown-pragmas",
  38. "--param=ssp-buffer-size=1",
  39. "-Waddress",
  40. "-Warray-bounds",
  41. "-Wbad-function-cast",
  42. "-Wchar-subscripts",
  43. "-Wcomment",
  44. "-Wfloat-equal",
  45. "-Wformat-security",
  46. "-Wformat=2",
  47. "-Wmaybe-uninitialized",
  48. "-Wmissing-field-initializers",
  49. "-Wmissing-noreturn",
  50. "-Wmissing-prototypes",
  51. "-Wnested-externs",
  52. "-Wnormalized=id",
  53. "-Woverride-init",
  54. "-Wpointer-arith",
  55. "-Wpointer-sign",
  56. "-Wshadow",
  57. "-Wsign-compare",
  58. "-Wstrict-overflow=1",
  59. "-Wstrict-prototypes",
  60. "-Wswitch-enum",
  61. "-Wundef",
  62. "-Wunused",
  63. "-Wunused-result",
  64. "-Wunused-variable",
  65. "-Wwrite-strings",
  66. "-fwrapv") & External_As_List ("CFLAGS", " ");
  67. for Switches ("Ada") use ("-g") & External_As_List ("ADAFLAGS", " ");
  68. end Compiler;
  69. package Binder is
  70. for Switches ("Ada") use ("-Es"); -- To include stack traces.
  71. end Binder;
  72. -- case OS is
  73. -- when "Windows" =>
  74. -- for Library_Options use ("-lm", -- To include the math library (used by WolfSSL).
  75. -- "-lcrypt32"); -- Needed on Windows.
  76. -- when "Linux_Or_Mac" =>
  77. -- for Library_Options use ("-lm"); -- To include the math library (used by WolfSSL).
  78. -- end case;
  79. --
  80. -- -- Put user options in front, for options like --as-needed.
  81. -- for Leading_Library_Options use External_As_List ("LDFLAGS", " ");
  82. end WolfSSl;