summaryrefslogtreecommitdiffstats
path: root/lvgl/hello/wscript
blob: c3e9da8bfeecbfbdc832d32dcad2ffe3cb09258e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright 2019 Vijay Kumar Banerjee (vijaykumar9597@gmail.com)
#
# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
#

import rtems_waf.rtems as rtems
import rtems_waf.rtems_bsd as rtems_bsd
import os

def build(bld):
    rtems.build(bld)
    if rtems.check_lib(bld, ['bsd', 'lvgl']):
        arch_inc_path = rtems.arch_bsp_include_path(str(bld.env.RTEMS_VERSION),
                                                    str(bld.env.RTEMS_ARCH_BSP))
        include_paths = ['',
                         'lvgl',
                         'lvgl/src',
                         'lv_drivers/display',]

        for i in range(0,len(include_paths)):
            include_paths[i] = os.path.join(bld.env.PREFIX, arch_inc_path, include_paths[i])

        bld(features = 'c cprogram',
            target = 'lvgl_hello.exe',
            source = ['test.c'],
            includes = include_paths,
            lib = ['m', 'lvgl', 'bsd'])