2018-01-16 22:35:55 +01:00
|
|
|
############################################################################
|
2022-01-28 12:46:55 +01:00
|
|
|
# apps/examples/lvgldemo/Makefile
|
2018-01-16 22:35:55 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2018-01-16 22:35:55 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2018-01-16 22:35:55 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2018-01-16 22:35:55 +01:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
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
|
|
|
|
|
2021-06-01 14:57:43 +02:00
|
|
|
CONFIG_LV_EXAMPLES_URL ?= https://github.com/lvgl/lv_demos/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
|
|
|
|
|
2021-06-01 14:57:43 +02:00
|
|
|
LVGL_EXAMPLES_UNPACKNAME = lv_demos
|
2020-06-17 10:50:05 +02:00
|
|
|
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-03-31 20:19:47 +02:00
|
|
|
CSRCS += fbdev.c lcddev.c
|
2019-04-08 14:57:42 +02:00
|
|
|
|
2021-04-12 21:06:40 +02:00
|
|
|
ifneq ($(CONFIG_INPUT_TOUCHSCREEN)$(CONFIG_INPUT_MOUSE),)
|
2021-03-31 20:19:47 +02:00
|
|
|
CSRCS += tp.c tp_cal.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
# static common assets used in multiple examples
|
2020-06-17 10:50:05 +02:00
|
|
|
|
2021-06-01 14:57:43 +02:00
|
|
|
LV_EXAMPLE_ASSETS = $(wildcard ./lv_demos/assets/*.c)
|
2020-06-17 10:50:05 +02:00
|
|
|
CSRCS += $(notdir $(LV_EXAMPLE_ASSETS))
|
2021-06-01 14:57:43 +02:00
|
|
|
VPATH += lv_demos/assets
|
2020-06-17 10:50:05 +02:00
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_BENCHMARK),)
|
|
|
|
CSRCS += lv_demo_benchmark.c
|
2021-06-01 14:57:43 +02:00
|
|
|
VPATH += lv_demos/src/lv_demo_benchmark
|
2020-06-17 10:50:05 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_PRINTER),)
|
2021-06-01 14:57:43 +02:00
|
|
|
LV_PRINTER_IMAGES = $(wildcard ./lv_demos/src/lv_demo_printer/images/*.c)
|
2020-06-17 10:50:05 +02:00
|
|
|
CSRCS += lv_demo_printer.c lv_demo_printer_theme.c
|
|
|
|
CSRCS += $(notdir $(LV_PRINTER_IMAGES))
|
2021-06-01 14:57:43 +02:00
|
|
|
VPATH += lv_demos/src/lv_demo_printer
|
|
|
|
VPATH += lv_demos/src/lv_demo_printer/images
|
2020-06-17 10:50:05 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_STRESS),)
|
|
|
|
CSRCS += lv_demo_stress.c
|
2021-06-01 14:57:43 +02:00
|
|
|
VPATH += lv_demos/src/lv_demo_stress
|
2020-06-17 10:50:05 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXAMPLES_LVGLDEMO_WIDGETS),)
|
|
|
|
CSRCS += lv_demo_widgets.c
|
2021-06-01 14:57:43 +02:00
|
|
|
VPATH += lv_demos/src/lv_demo_widgets
|
2020-06-17 10:50:05 +02:00
|
|
|
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):
|
2021-06-01 15:00:44 +02:00
|
|
|
$(Q) 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)
|
2021-06-01 15:00:44 +02:00
|
|
|
$(Q) echo "Unpacking: $(LVGL_EXAMPLES_TARBALL) -> $(LVGL_EXAMPLES_UNPACKNAME)"
|
2020-06-17 10:50:05 +02:00
|
|
|
$(Q) $(UNPACK) $(LVGL_EXAMPLES_TARBALL)
|
2021-06-01 14:57:43 +02:00
|
|
|
$(Q) mv lv_demos-$(LVGL_EXAMPLES_VERSION) $(LVGL_EXAMPLES_UNPACKNAME)
|
2020-06-17 10:50:05 +02:00
|
|
|
$(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
|