improve libbpf (#323)
parent
e8665e224a
commit
e4ac3586ab
4 changed files with 64 additions and 17 deletions
@ -0,0 +1,29 @@ |
||||
package("memorymapping") |
||||
|
||||
set_homepage("https://github.com/NimbusKit/memorymapping") |
||||
set_description("fmemopen port library") |
||||
|
||||
set_urls("https://github.com/NimbusKit/memorymapping.git") |
||||
|
||||
add_versions("2014.12.21", "79ce0ddd0de4b11e4944625eb866290368f867c0") |
||||
|
||||
on_install("android", "macosx", "iphoneos", function (package) |
||||
io.writefile("xmake.lua", [[ |
||||
add_rules("mode.debug", "mode.release") |
||||
target("fmemopen") |
||||
set_kind("$(kind)") |
||||
add_files("src/*.c") |
||||
add_headerfiles("src/*.h") |
||||
]]) |
||||
local configs = {} |
||||
if package:config("shared") then |
||||
configs.kind = "shared" |
||||
elseif package:config("pic") ~= false then |
||||
configs.cxflags = "-fPIC" |
||||
end |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("fmemopen", {includes = {"stdio.h", "fmemopen.h"}})) |
||||
end) |
Loading…
Reference in new issue