From 3a527421fef669690b610286f35aec0d8498939d Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 11 Dec 2017 19:52:13 -0500 Subject: Further cleanup of macro generation in build.h --- src/build-data/buildh.in | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src/build-data/buildh.in') diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 6d814398c..1e32532db 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -43,18 +43,41 @@ #endif /* Target identification and feature test macros */ -%{for os_defines} -#define BOTAN_TARGET_OS_%{i} -%{endfor} -%{for cc_defines} -#define BOTAN_%{i} +#define BOTAN_TARGET_OS_IS_%{os_name|upper} +%{if os_type} +#define BOTAN_TARGET_OS_TYPE_IS_%{os_type|upper} +%{endif} + +%{for os_features} +#define BOTAN_TARGET_OS_HAS_%{i|upper} %{endfor} +#define BOTAN_BUILD_COMPILER_IS_%{cc_macro} + +#define BOTAN_TARGET_ARCH_IS_%{arch|upper} +%{if endian} +#define BOTAN_TARGET_CPU_IS_%{endian|upper}_ENDIAN +%{endif} +%{if cpu_family} +#define BOTAN_TARGET_CPU_IS_%{cpu_family|upper}_FAMILY +%{endif} +%{if cpu_is_64bit} +#define BOTAN_TARGET_CPU_HAS_NATIVE_64BIT +%{endif} + %{for cpu_defines} #define BOTAN_%{i} %{endfor} +%{if with_valgrind} +#define BOTAN_HAS_VALGRIND +%{endif} + +%{if with_openmp} +#define BOTAN_TARGET_HAS_OPENMP +%{endif} + /* * Module availability definitions */ -- cgit v1.2.3