Skip to content

Commit

Permalink
tinyalloc: add package (#3015)
Browse files Browse the repository at this point in the history
* tinyalloc: add package

* remove defines
  • Loading branch information
star-hengxing authored Jan 1, 2024
1 parent 4390039 commit 121e200
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/t/tinyalloc/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package("tinyalloc")
set_homepage("https://github.com/thi-ng/tinyalloc")
set_description("malloc / free replacement for unmanaged, linear memory situations (e.g. WASM, embedded devices...)")
set_license("Apache-2.0")

add_urls("https://github.com/thi-ng/tinyalloc.git")
add_versions("2021.10.08", "b60fcd7a351dea8a51f3ec95b19fc0d0d2e4dcd9")

on_install(function (package)
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("tinyalloc")
set_kind("$(kind)")
add_files("tinyalloc.c")
add_headerfiles("tinyalloc.h")
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all")
end
]])
import("package.tools.xmake").install(package)
end)

on_test(function (package)
assert(package:has_cfuncs("ta_init", {includes = "tinyalloc.h"}))
end)

0 comments on commit 121e200

Please sign in to comment.