1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00
lvgl/tests/Makefile

58 lines
1.2 KiB
Makefile
Raw Normal View History

#
# Makefile
#
CC ?= gcc
LVGL_DIR ?= ${shell pwd}/../..
2020-01-12 15:03:12 +01:00
LVGL_DIR_NAME ?= lvgl
2020-05-24 13:13:07 +02:00
WARNINGS = -Werror -Wall -Wextra \
-Wshadow -Wundef -Wmaybe-uninitialized -Wmissing-prototypes -Wpointer-arith -Wuninitialized \
-Wunreachable-code -Wreturn-type -Wmultichar -Wformat-security -Wdouble-promotion -Wclobbered -Wdeprecated \
2020-05-06 20:05:04 +02:00
-Wempty-body -Wshift-negative-value -Wstack-usage=2048 \
2020-05-24 13:13:07 +02:00
-Wtype-limits -Wsizeof-pointer-memaccess
2020-05-06 20:05:04 +02:00
#-Wno-unused-value -Wno-unused-parameter
OPTIMIZATION ?= -O3 -g0
CFLAGS ?= -I$(LVGL_DIR)/ $(DEFINES) $(WARNINGS) $(OPTIMIZATION) -I$(LVGL_DIR) -I.
LDFLAGS ?= -lpng
BIN ?= demo
#Collect the files to compile
MAINSRC = ./lv_test_main.c
2020-01-12 15:03:12 +01:00
include ../lvgl.mk
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
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)