It is simple.
just this can work:
var SRCS = ["videnc_copy", "list", "fft", "mesg", "mpool", "vad_detect"];
print("build file:" + SRCS + "**************");
for (var i = 0; i < Build.targets.length; i++)
{
var targ = Build.targets[i];
print("building for target " + targ.name + " ...");
/*
* Add a library to this package and add the files described in
* SRCS to the library.
*/
if (targ.name == "C64P" || targ.name == "C674") {
/*
* The 64P target can provide an optimized implementation that
* uses DMA! So we build 2 libraries, the traditional one
* (done outside this if branch), and another one that's
* optimized to use DMA.
*/
Pkg.addLibrary("lib/videnc_copy_dma", targ, {
copts: "-DUSE_ACPY3 ",
}).addObjects(SRCS);
}
Pkg.addLibrary("lib/videnc_copy", targ).addObjects(SRCS);
}