Home | History | Annotate | Download | only in modes
      1 include_directories(../../include)
      2 
      3 if (${ARCH} STREQUAL "x86_64")
      4   set(
      5     MODES_ARCH_SOURCES
      6 
      7     aesni-gcm-x86_64.${ASM_EXT}
      8     ghash-x86_64.${ASM_EXT}
      9   )
     10 endif()
     11 
     12 if (${ARCH} STREQUAL "x86")
     13   set(
     14     MODES_ARCH_SOURCES
     15 
     16     ghash-x86.${ASM_EXT}
     17   )
     18 endif()
     19 
     20 if (${ARCH} STREQUAL "arm")
     21   set(
     22     MODES_ARCH_SOURCES
     23 
     24     ghash-armv4.${ASM_EXT}
     25     ghashv8-armx.${ASM_EXT}
     26   )
     27 endif()
     28 
     29 if (${ARCH} STREQUAL "aarch64")
     30   set(
     31     MODES_ARCH_SOURCES
     32 
     33     ghashv8-armx.${ASM_EXT}
     34   )
     35 endif()
     36 
     37 add_library(
     38   modes
     39 
     40   OBJECT
     41 
     42   cbc.c
     43   ctr.c
     44   ofb.c
     45   cfb.c
     46   gcm.c
     47 
     48   ${MODES_ARCH_SOURCES}
     49 )
     50 
     51 perlasm(aesni-gcm-x86_64.${ASM_EXT} asm/aesni-gcm-x86_64.pl)
     52 perlasm(ghash-x86_64.${ASM_EXT} asm/ghash-x86_64.pl)
     53 perlasm(ghash-x86.${ASM_EXT} asm/ghash-x86.pl)
     54 perlasm(ghash-armv4.${ASM_EXT} asm/ghash-armv4.pl)
     55 perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
     56 
     57 add_executable(
     58   gcm_test
     59 
     60   gcm_test.c
     61 
     62   $<TARGET_OBJECTS:test_support>
     63 )
     64 
     65 target_link_libraries(gcm_test crypto)
     66 add_dependencies(all_tests gcm_test)
     67