|
|
|
@ -18,36 +18,9 @@ package("opencore-amr") |
|
|
|
|
table.insert(configs, "--with-pic") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if is_plat("android") then |
|
|
|
|
import("core.tool.toolchain") |
|
|
|
|
local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()}) |
|
|
|
|
local cxflags = ndk:get("cxflags") |
|
|
|
|
local cflags = table.join(table.wrap(cxflags), ndk:get("cflags")) |
|
|
|
|
local cxxflags = table.join(table.wrap(cxflags), ndk:get("cxxflags")) |
|
|
|
|
local sysincludedirs = ndk:get("sysincludedirs") |
|
|
|
|
|
|
|
|
|
for _, includedir in ipairs(sysincludedirs) do |
|
|
|
|
table.insert(cflags, "-I" .. includedir) |
|
|
|
|
table.insert(cxxflags, "-I" .. includedir) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local cc = package:tool("cc") |
|
|
|
|
local cxx = package:tool("cxx") |
|
|
|
|
local cpp = package:tool("cpp") |
|
|
|
|
local as = package:tool("as") |
|
|
|
|
local ar = package:tool("ar") |
|
|
|
|
|
|
|
|
|
import("package.tools.autoconf").install(package, configs, { |
|
|
|
|
envs = { |
|
|
|
|
CC = cc, CXX = cxx, CPP = cpp, |
|
|
|
|
AR = ar, AS = as, |
|
|
|
|
CFLAGS = table.concat(cflags, ' '), |
|
|
|
|
CXXFLAGS = table.concat(cxxflags, ' '), |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
else |
|
|
|
|
import("package.tools.autoconf").install(package, configs) |
|
|
|
|
end |
|
|
|
|
local buildenvs = import("package.tools.autoconf").buildenvs(package) |
|
|
|
|
buildenvs.CXX = package:tool("cxx") |
|
|
|
|
import("package.tools.autoconf").install(package, configs, {envs = buildenvs}) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
|