xmake.lua 911 B

12345678910111213141516171819202122232425
  1. package("tlsf")
  2. set_homepage("https://github.com/mattconte/tlsf")
  3. set_description("Two-Level Segregated Fit memory allocator implementation.")
  4. set_license("BSD-3-Clause")
  5. add_urls("https://github.com/mattconte/tlsf.git")
  6. add_versions("2020.03.29", "deff9ab509341f264addbd3c8ada533678591905")
  7. on_install(function (package)
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.release", "mode.debug")
  10. target("tlsf")
  11. set_kind("$(kind)")
  12. add_files("tlsf.c")
  13. add_headerfiles("tlsf.h")
  14. if is_plat("windows") and is_kind("shared") then
  15. add_rules("utils.symbols.export_all")
  16. end
  17. ]])
  18. import("package.tools.xmake").install(package)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("tlsf_malloc", {includes = "tlsf.h"}))
  22. end)