mirror of
https://github.com/oasislinux/oasis.git
synced 2026-02-01 11:34:17 +01:00
musl declares ioctl to have an int request code, so some requests might cause signed integer overflow, but will behave as expected.
22 lines
578 B
Lua
22 lines
578 B
Lua
cflags{
|
|
'-std=c99', '-Wall', '-Wextra', '-Wpedantic',
|
|
'-Wno-overflow', -- ioctl opcode conversion
|
|
'-I $srcdir/include',
|
|
'-isystem $builddir/pkg/linux-headers/include',
|
|
'-include $dir/config.h',
|
|
}
|
|
|
|
pkg.deps = {
|
|
'pkg/linux-headers/headers',
|
|
}
|
|
|
|
lib('libgpiod.a', 'lib/(core.c ctxless.c helpers.c iter.c misc.c)')
|
|
|
|
cc('tools/tools-common.c')
|
|
for _, tool in ipairs{'gpiodetect', 'gpioinfo', 'gpioget', 'gpioset', 'gpiomon', 'gpiofind'} do
|
|
exe(tool, {'tools/'..tool..'.c', 'tools/tools-common.c.o', 'libgpiod.a'})
|
|
file('bin/'..tool, '755', '$outdir/'..tool)
|
|
end
|
|
|
|
fetch 'git'
|