2018-01-16 22:35:55 +01:00
|
|
|
############################################################################
|
|
|
|
# apps/examples/lgvldemo/Makefile
|
|
|
|
#
|
|
|
|
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
|
|
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in
|
|
|
|
# the documentation and/or other materials provided with the
|
|
|
|
# distribution.
|
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
# used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-20 06:35:03 +02:00
|
|
|
include $(APPDIR)/Make.defs
|
2018-01-16 22:35:55 +01:00
|
|
|
|
|
|
|
# LittleVGL demo built-in application info
|
|
|
|
|
2020-08-10 18:57:42 +02:00
|
|
|
CONFIG_LV_EXAMPLES_URL ?= https://github.com/lvgl/lv_examples/archive
|
2020-06-17 10:50:05 +02:00
|
|
|
|
2020-08-14 14:31:51 +02:00
|
|
|
LVGL_EXAMPLES_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LVGL_VERSION)))
|
2020-06-17 10:50:05 +02:00
|
|
|
LVGL_EXAMPLES_TARBALL = v$(LVGL_EXAMPLES_VERSION).zip
|
|
|
|
|
|
|
|
LVGL_EXAMPLES_UNPACKNAME = lv_examples
|
|
|
|
UNPACK ?= unzip -o
|
|
|
|
|
2019-10-06 14:14:39 +02:00
|
|
|
PROGNAME = lvgldemo
|
2018-01-16 22:35:55 +01:00
|
|
|
PRIORITY = $(CONFIG_EXAMPLES_LVGLDEMO_PRIORITY)
|
|
|
|
STACKSIZE = $(CONFIG_EXAMPLES_LVGLDEMO_STACKSIZE)
|
2019-10-06 14:14:39 +02:00
|
|
|
MODULE = $(CONFIG_EXAMPLES_LVGLDEMO)
|
2018-01-16 22:35:55 +01:00
|
|
|
|
|
|
|
# LittleVGL demo Example
|
|
|
|
|
2021-02-15 10:05:04 +01:00
|
|
|
CSRCS += fbdev.c lcddev.c tp.c tp_cal.c
|
2019-04-08 14:57:42 +02:00
|
|
|
|
2020-06-17 10:50:05 +02:00
|
|
|
# static common assets used in mutiple example
|
|
|
|
|
|
|
|
LV_EXAMPLE_ASSETS = $(wildcard ./lv_examples/assets/*.c)
|
|
|
|
CSRCS += $(notdir $(LV_EXAMPLE_ASSETS))
|
|
|
|
VPATH += lv_examples/assets
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_BENCHMARK),)
|
|
|
|
CSRCS += lv_demo_benchmark.c
|
|
|
|
VPATH += lv_examples/src/lv_demo_benchmark
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_PRINTER),)
|
|
|
|
LV_PRINTER_IMAGES = $(wildcard ./lv_examples/src/lv_demo_printer/images/*.c)
|
|
|
|
CSRCS += lv_demo_printer.c lv_demo_printer_theme.c
|
|
|
|
CSRCS += $(notdir $(LV_PRINTER_IMAGES))
|
|
|
|
VPATH += lv_examples/src/lv_demo_printer
|
|
|
|
VPATH += lv_examples/src/lv_demo_printer/images
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_STRESS),)
|
|
|
|
CSRCS += lv_demo_stress.c
|
|
|
|
VPATH += lv_examples/src/lv_demo_stress
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_WIDGETS),)
|
|
|
|
CSRCS += lv_demo_widgets.c
|
|
|
|
VPATH += lv_examples/src/lv_demo_widgets
|
|
|
|
endif
|
|
|
|
|
2018-01-16 22:35:55 +01:00
|
|
|
MAINSRC = lvgldemo.c
|
|
|
|
|
2020-11-29 15:34:56 +01:00
|
|
|
CFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} -Wno-format
|
|
|
|
CXXFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} -Wno-format
|
2018-01-16 22:35:55 +01:00
|
|
|
|
2020-06-17 10:50:05 +02:00
|
|
|
$(LVGL_EXAMPLES_TARBALL):
|
|
|
|
@echo "Downloading: $(LVGL_EXAMPLES_TARBALL)"
|
2020-12-21 12:48:58 +01:00
|
|
|
$(Q) curl -O -L $(CONFIG_LV_EXAMPLES_URL)/$(LVGL_EXAMPLES_TARBALL)
|
2020-06-17 10:50:05 +02:00
|
|
|
|
|
|
|
$(LVGL_EXAMPLES_UNPACKNAME): $(LVGL_EXAMPLES_TARBALL)
|
|
|
|
@echo "Unpacking: $(LVGL_EXAMPLES_TARBALL) -> $(LVGL_EXAMPLES_UNPACKNAME)"
|
|
|
|
$(Q) $(UNPACK) $(LVGL_EXAMPLES_TARBALL)
|
|
|
|
$(Q) mv lv_examples-$(LVGL_EXAMPLES_VERSION) $(LVGL_EXAMPLES_UNPACKNAME)
|
|
|
|
$(Q) touch $(LVGL_EXAMPLES_UNPACKNAME)
|
|
|
|
|
|
|
|
context:: $(LVGL_EXAMPLES_UNPACKNAME)
|
|
|
|
|
|
|
|
distclean::
|
|
|
|
$(call DELDIR, $(LVGL_EXAMPLES_UNPACKNAME))
|
|
|
|
$(call DELFILE, $(LVGL_EXAMPLES_TARBALL))
|
|
|
|
|
2018-01-16 22:35:55 +01:00
|
|
|
include $(APPDIR)/Application.mk
|