Import("env")

env.Append(
    CPPPATH=[
        "#/lib/infrared/encoder_decoder",
        "#/lib/infrared/worker",
    ],
    SDK_HEADERS=[
        File("encoder_decoder/infrared.h"),
        File("worker/infrared_worker.h"),
        File("worker/infrared_transmit.h"),
    ],
)


libenv = env.Clone(FW_LIB_NAME="infrared")
libenv.ApplyLibFlags()

sources = libenv.GlobRecursive("*.c")

lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
libenv.Install("${LIB_DIST_DIR}", lib)
Return("lib")