 +set(rc4_srcs
 +  rc4/build.info
 +  rc4/rc4_locl.h
-+  rc4/rc4_enc.c # rc4_asm_src DEFAULT (Configurations/00-base-templates.conf)
-+  rc4/rc4_skey.c # rc4_asm_src DEFAULT (Configurations/00-base-templates.conf)
-+  )
++  )
++if(NOT ASM_BUILD)
++  list(APPEND rc4_srcs
++    rc4/rc4_enc.c # rc4_asm_src DEFAULT (Configurations/00-base-templates.conf)
++    rc4/rc4_skey.c # rc4_asm_src DEFAULT (Configurations/00-base-templates.conf)
++    )
++else()
++  set(rc4_extra
++    rc4/rc4_enc.c
++    rc4/rc4_skey.c
++    )
++endif()
 +source_group(rc4 FILES ${rc4_srcs})
 +list(APPEND ${lib_name}_libsrcs ${rc4_srcs})
 +##########
-+set(rc4_extra # TODO asm
++list(APPEND rc4_extra # TODO asm
 +  rc4/asm/rc4-586.pl
 +  rc4/asm/rc4-c64xplus.pl
 +  rc4/asm/rc4-md5-x86_64.pl

+  )
+list(APPEND camellia_srcs
+  camellia/cmll_locl.h
+  camellia/camellia.c # cmll_asm_src DEFAULT (Configurations/00-base-templates.conf)
+  camellia/cmll_misc.c # cmll_asm_src DEFAULT (Configurations/00-base-templates.conf)
+  )
+if(NOT ASM_BUILD)
+  list(APPEND camellia_srcs
+    camellia/cmll_cbc.c # cmll_asm_src DEFAULT (Configurations/00-base-templates.conf)
+    )
+else()
+  list(APPEND camellia_extra
+    camellia/cmll_cbc.c
+    )
+endif()

+DEFINE_LHASH_OF(FUNCTION);
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
new file mode 100644
index 0000000..e6dbe26
--- /dev/null
+++ b/crypto/CMakeLists.txt
@@ -0,0 +1,1891 @@
+set(lib_name crypto)
+########################################
+set(gen_file include/buildinf.h)
