master hovercats/oakiss / pkg / tinyalsa / gen.lua
 1cflags{
 2	'-std=c99', '-Wall', '-Wpedantic', '-Wno-overflow',
 3	'-D _POSIX_C_SOURCE=201112L',
 4	'-I $srcdir/include',
 5	'-isystem $builddir/pkg/linux-headers/include',
 6}
 7
 8pkg.deps = {'pkg/linux-headers/headers'}
 9
10pkg.hdrs = copy('$outdir/include/tinyalsa', '$srcdir/include/tinyalsa', {
11	'attributes.h',
12	'pcm.h',
13	'mixer.h',
14	'asoundlib.h',
15	'version.h',
16})
17
18lib('libtinyalsa.a', [[
19	src/(
20		limits.c
21		pcm.c
22		pcm_hw.c
23		mixer.c
24		mixer_hw.c
25	)
26]])
27
28for _, tool in ipairs{'tinycap', 'tinymix', 'tinypcminfo', 'tinyplay'} do
29	file('bin/'..tool, '755', exe(tool, {'utils/'..tool..'.c', 'libtinyalsa.a'}))
30	man{'utils/'..tool..'.1'}
31end
32
33fetch 'git'