xmake.lua 951 B

1234567891011121314151617181920212223242526272829
  1. add_rules("mode.release", "mode.debug")
  2. target("blake3")
  3. set_kind("$(kind)")
  4. add_files("c/blake3.c", "c/blake3_dispatch.c", "c/blake3_portable.c")
  5. add_headerfiles("c/blake3.h")
  6. if is_arch("x86_64", "x64") then
  7. if is_subhost("msys", "cygwin") then
  8. add_files("c/*x86-64_windows_gnu.S")
  9. elseif is_plat("windows") then
  10. add_files("c/*x86-64_windows_msvc.asm")
  11. else
  12. add_files("c/*x86-64_unix.S")
  13. end
  14. elseif is_arch("x86", "i386") then
  15. add_files("c/blake3_portable.c")
  16. add_files("c/blake3_sse2.c")
  17. add_files("c/blake3_sse41.c")
  18. add_files("c/blake3_avx2.c")
  19. add_files("c/blake3_avx512.c")
  20. elseif is_arch("arm64", "arm64-v8a") then
  21. add_files("c/blake3_neon.c")
  22. add_defines("BLAKE3_USE_NEON=1")
  23. end
  24. if is_plat("windows") and is_kind("shared") then
  25. add_rules("utils.symbols.export_all")
  26. end