[rtems-littlevgl commit] lvgl: Get lv_drivers source list directly from the directory

Vijay Kumar Banerjee vijay at rtems.org
Fri Jun 5 12:32:41 UTC 2020


Module:    rtems-littlevgl
Branch:    master
Commit:    95db220a0e22b0879c21aaefdac242a6aa6be296
Changeset: http://git.rtems.org/rtems-littlevgl/commit/?id=95db220a0e22b0879c21aaefdac242a6aa6be296

Author:    Vijay Kumar Banerjee <vijay at rtems.org>
Date:      Wed Jun  3 20:05:23 2020 +0530

lvgl: Get lv_drivers source list directly from the directory

---

 lvgl.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lvgl.py b/lvgl.py
index d79afb2..91fa14b 100644
--- a/lvgl.py
+++ b/lvgl.py
@@ -31,6 +31,8 @@ import re
 import rtems_waf.rtems as rtems
 
 def source_list(bld):
+    sources = []
+    cflags = []
     mk_files = ['lvgl/src/lv_core/lv_core.mk',
                 'lvgl/src/lv_hal/lv_hal.mk',
                 'lvgl/src/lv_objx/lv_objx.mk',
@@ -39,10 +41,10 @@ def source_list(bld):
                 'lvgl/src/lv_themes/lv_themes.mk',
                 'lvgl/src/lv_draw/lv_draw.mk',
                ]
+
     if bld.env.DRIVERS:
-        mk_files.append('lv_drivers/display/display.mk')
-    sources = []
-    cflags = []
+        drv_path = ['lv_drivers/display', 'lv_drivers/indev']
+        sources = [os.path.join(d, s) for d in drv_path for s in os.listdir(d) if (s[-2:] == '.c')]
 
     for filename in mk_files:
       lexer = shlex.shlex(open(filename, 'rt').read())
@@ -86,7 +88,10 @@ def build(bld):
     arch_inc_path = rtems.arch_bsp_include_path(bld.env.RTEMS_VERSION,
                                                 bld.env.RTEMS_ARCH_BSP)
 
-    include_paths.extend(['lvgl/', 'lv_drivers', 'lvgl/src', '.'])
+    include_paths.extend(['lvgl/', 'lvgl/src', '.'])
+    if bld.env.DRIVERS:
+        include_paths.extend(['lv_drivers/display', 'lv_drivers/indev'])
+
     for include_path in include_paths:
         files = os.listdir(include_path)
         include_headers = [os.path.join(include_path, x) for x in files if (x[-2:] == '.h')]



More information about the vc mailing list