Import('*')

env = env.Clone()

env.Prepend(CPPPATH = [
    '#include'
])

env.Append(CPPDEFINES = ['__NOT_HAVE_DRM_H'])

if env['udev']:
    env.PkgUseModules('UDEV')
    env.Append(CPPDEFINES = ['HAVE_LIBUDEV'])

# parse Makefile.sources
sources = env.ParseSourceList('Makefile.sources', 'LOADER_C_FILES')

libloader = env.ConvenienceLibrary(
    target = 'libloader',
    source = sources,
)

env.Alias('libloader', libloader)
Export('libloader')
