1+ with "config/wolfssl_config.gpr";
2+
13library project WolfSSL is
24
35 for Library_Name use "wolfssl";
4- -- for Library_Version use Project'Library_Name & ".so";
5- type OS_Kind is ("Windows", "Linux_Or_Mac");
6-
7- OS : OS_Kind := external ("OS", "Linux_Or_Mac");
86
97 for Languages use ("C", "Ada");
108
@@ -15,12 +13,13 @@ library project WolfSSL is
1513
1614 -- Don't build the tls client or server application.
1715 -- They are not needed in order to build the library.
18- for Excluded_Source_Files use ("tls_client_main.adb",
19- "tls_client.ads",
20- "tls_client.adb",
21- "tls_server_main.adb",
22- "tls_server.ads",
23- "tls_server.adb");
16+ for Excluded_Source_Files use
17+ ("tls_client_main.adb",
18+ "tls_client.ads",
19+ "tls_client.adb",
20+ "tls_server_main.adb",
21+ "tls_server.ads",
22+ "tls_server.adb");
2423
2524 for Object_Dir use "obj";
2625 for Library_Dir use "lib";
@@ -34,12 +33,19 @@ library project WolfSSL is
3433 for Spec_Suffix ("C") use ".h";
3534 end Naming;
3635
37- package Builder is
38- for Global_Configuration_Pragmas use "gnat.adc";
39- end Builder;
36+ C_Compiler_Config := ();
37+
38+ case Wolfssl_Config.STATIC_PSK is
39+ when "True" =>
40+ C_Compiler_Config :=
41+ ("-DWOLFSSL_STATIC_PSK" -- Enable the static PSK cipher support
42+ );
43+ when others =>
44+ C_Compiler_Config := ();
45+ end case;
4046
4147 package Compiler is
42- for Switches ("C") use
48+ for Switches ("C") use C_Compiler_Config &
4349 ("-DWOLFSSL_USER_SETTINGS", -- Use the user_settings.h file.
4450 "-Wno-pragmas",
4551 "-Wall",
@@ -81,16 +87,5 @@ library project WolfSSL is
8187 package Binder is
8288 for Switches ("Ada") use ("-Es"); -- To include stack traces.
8389 end Binder;
84-
85- -- case OS is
86- -- when "Windows" =>
87- -- for Library_Options use ("-lm", -- To include the math library (used by WolfSSL).
88- -- "-lcrypt32"); -- Needed on Windows.
89- -- when "Linux_Or_Mac" =>
90- -- for Library_Options use ("-lm"); -- To include the math library (used by WolfSSL).
91- -- end case;
92- --
93- -- -- Put user options in front, for options like --as-needed.
94- -- for Leading_Library_Options use External_As_List ("LDFLAGS", " ");
9590
9691end WolfSSl;
0 commit comments