2019-12-26 02:49:30 +01:00
|
|
|
#
|
|
|
|
# Makefile
|
|
|
|
#
|
|
|
|
CC ?= gcc
|
2020-01-12 14:34:43 +01:00
|
|
|
LVGL_DIR ?= ${shell pwd}/../..
|
2020-01-12 15:03:12 +01:00
|
|
|
LVGL_DIR_NAME ?= lvgl
|
2019-12-26 02:49:30 +01:00
|
|
|
|
2020-05-24 13:13:07 +02:00
|
|
|
WARNINGS = -Werror -Wall -Wextra \
|
2020-05-24 13:14:42 +02:00
|
|
|
-Wshadow -Wundef -Wmaybe-uninitialized -Wmissing-prototypes -Wpointer-arith -Wuninitialized \
|
|
|
|
-Wunreachable-code -Wreturn-type -Wmultichar -Wformat-security -Wdouble-promotion -Wclobbered -Wdeprecated \
|
|
|
|
-Wempty-body -Wshift-negative-value -Wstack-usage=2048 \
|
|
|
|
-Wtype-limits -Wsizeof-pointer-memaccess
|
2020-05-06 20:05:04 +02:00
|
|
|
|
|
|
|
#-Wno-unused-value -Wno-unused-parameter
|
2019-12-26 02:49:30 +01:00
|
|
|
OPTIMIZATION ?= -O3 -g0
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS ?= -I$(LVGL_DIR)/ $(DEFINES) $(WARNINGS) $(OPTIMIZATION) -I$(LVGL_DIR) -I.
|
|
|
|
|
2020-01-16 14:26:36 +01:00
|
|
|
LDFLAGS ?= -lpng
|
2019-12-26 02:49:30 +01:00
|
|
|
BIN ?= demo
|
|
|
|
|
|
|
|
|
|
|
|
#Collect the files to compile
|
2020-01-16 14:26:36 +01:00
|
|
|
MAINSRC = ./lv_test_main.c
|
2019-12-26 02:49:30 +01:00
|
|
|
|
2020-01-12 15:03:12 +01:00
|
|
|
include ../lvgl.mk
|
2019-12-26 02:49:30 +01:00
|
|
|
|
2020-01-16 14:26:36 +01:00
|
|
|
CSRCS += lv_test_assert.c
|
2020-02-15 02:19:44 +01:00
|
|
|
CSRCS += lv_test_core/lv_test_core.c
|
|
|
|
CSRCS += lv_test_core/lv_test_obj.c
|
|
|
|
CSRCS += lv_test_core/lv_test_style.c
|
2020-08-03 19:33:52 -03:00
|
|
|
CSRCS += lv_test_core/lv_test_font_loader.c
|
2020-08-31 13:57:18 +02:00
|
|
|
CSRCS += lv_test_widgets/lv_test_label.c
|
2020-08-12 00:11:02 -03:00
|
|
|
CSRCS += lv_test_fonts/font_1.c
|
|
|
|
CSRCS += lv_test_fonts/font_2.c
|
|
|
|
CSRCS += lv_test_fonts/font_3.c
|
2020-01-16 14:26:36 +01:00
|
|
|
|
2019-12-26 02:49:30 +01:00
|
|
|
OBJEXT ?= .o
|
|
|
|
|
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
|
|
|
|
|
|
MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|
|
|
|
|
|
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
|
|
|
OBJS = $(AOBJS) $(COBJS)
|
|
|
|
|
|
|
|
## MAINOBJ -> OBJFILES
|
|
|
|
|
|
|
|
all: default
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
@echo "CC $<"
|
|
|
|
|
|
|
|
default: $(AOBJS) $(COBJS) $(MAINOBJ)
|
|
|
|
$(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
|
|
|
|
|