diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-02 16:01:16 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-02 16:01:16 +0100 |
commit | 4496be6e29732189769b78f63e491dacb23c961b (patch) | |
tree | 5882550f4cf9b516fdd613bbaf4535a7f59d981a /src/crypto/mac/CMakeLists.txt | |
parent | 20a95ef2731ce21acfe5c1ba97b40001217b0216 (diff) | |
download | fastd-4496be6e29732189769b78f63e491dacb23c961b.tar fastd-4496be6e29732189769b78f63e491dacb23c961b.zip |
Convert ghash to the new crypto algorithm scheme
Diffstat (limited to 'src/crypto/mac/CMakeLists.txt')
-rw-r--r-- | src/crypto/mac/CMakeLists.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/crypto/mac/CMakeLists.txt b/src/crypto/mac/CMakeLists.txt new file mode 100644 index 0000000..7f8664c --- /dev/null +++ b/src/crypto/mac/CMakeLists.txt @@ -0,0 +1,34 @@ +set(MACS "") + +if(WITH_MAC_GHASH) + list(APPEND MACS ghash) +endif(WITH_MAC_GHASH) + +set(MAC_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/macs.c") + +set(MAC_DEFINITIONS "") +set(MAC_IMPLS "") +set(MAC_LIST "") + +foreach(mac ${MACS}) + add_subdirectory(${mac}) + + list(APPEND MAC_SOURCES ${IMPL_SOURCES}) + + set(MAC_LIST "${MAC_LIST}\n{\"${MAC_NAME}\", mac_${mac}_impls},") + set(MAC_IMPLS "${MAC_IMPLS}\nstatic const fastd_mac_t *const mac_${mac}_impls[] = {") + + foreach(impl ${IMPLS}) + set(MAC_DEFINITIONS "${MAC_DEFINITIONS}\nextern const fastd_mac_t fastd_mac_${mac}_${impl};") + set(MAC_IMPLS "${MAC_IMPLS}&fastd_mac_${mac}_${impl}, ") + endforeach(impl) + + set(MAC_IMPLS "${MAC_IMPLS}NULL};") + +endforeach(mac) + + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/macs.c.in ${CMAKE_CURRENT_BINARY_DIR}/macs.c) + + +set(MAC_SOURCES "${MAC_SOURCES}" PARENT_SCOPE) |