[PATCH rtems-littelvgl] Allow to build without drivers.

Christian Mauderer christian.mauderer at embedded-brains.de
Tue Nov 5 11:56:03 UTC 2019


This is for example usefull if you want to build without libbsd.
---
 lvgl.py | 8 +++++---
 wscript | 7 +++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/lvgl.py b/lvgl.py
index 6d83c63..5452ed0 100644
--- a/lvgl.py
+++ b/lvgl.py
@@ -30,7 +30,7 @@ import os
 import re
 import rtems_waf.rtems as rtems
 
-def source_list():
+def source_list(bld):
     mk_files = ['lvgl/src/lv_core/lv_core.mk',
                 'lvgl/src/lv_hal/lv_hal.mk',
                 'lvgl/src/lv_objx/lv_objx.mk',
@@ -38,7 +38,9 @@ def source_list():
                 'lvgl/src/lv_misc/lv_misc.mk',
                 'lvgl/src/lv_themes/lv_themes.mk',
                 'lvgl/src/lv_draw/lv_draw.mk',
-                'lv_drivers/display/display.mk']
+               ]
+    if bld.env.DRIVERS:
+        mk_files.append('lv_drivers/display/display.mk')
     sources = []
     cflags = []
 
@@ -64,7 +66,7 @@ def source_list():
 
 def build(bld):
 
-    sources, includes = source_list()
+    sources, includes = source_list(bld)
     includes.append('.')
     objects = []
     include_paths = []
diff --git a/wscript b/wscript
index 03e010c..ae91daa 100644
--- a/wscript
+++ b/wscript
@@ -43,8 +43,15 @@ def init(ctx):
 
 def options(opt):
     rtems.options(opt)
+    opt.add_option("--no-drivers",
+                   action = "store_false",
+                   default = True,
+                   dest = "drivers",
+                   help = "Build without lv_drivers." +
+                          "Useful for building without libbsd.")
 
 def configure(conf):
+    conf.env.DRIVERS = conf.options.drivers
     rtems.configure(conf)
 
 def build(bld):
-- 
2.16.4



More information about the devel mailing list