This repository has been archived by the owner on May 3, 2024. It is now read-only.
forked from lvgl/lv_port_linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (52 loc) · 2.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Makefile
#
CC ?= gcc
LVGL_DIR_NAME ?= lvgl
LVGL_DIR ?= ${shell pwd}
INCLUDE_FLAGS = -I$(LVGL_DIR)/ui/ -I$(LVGL_DIR)/squareline/
DEFINE_FLAGS = -DLIBUBUS
LIB_FLAGS += -lubox -lubus
CFLAGS += -O1 -g3 -I$(LVGL_DIR)/ -Wall -Wshadow -Wundef -Wmissing-prototypes -Wall -Wextra \
-Wno-unused-function -Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing \
-Wno-error=cpp -Wuninitialized -Wno-unused-parameter -Wno-missing-field-initializers \
-Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral -Wno-cast-qual \
-Wunreachable-code -Wno-switch-default -Wreturn-type -Wmultichar -Wformat-security \
-Wno-ignored-qualifiers -Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes \
-Wdouble-promotion -Wdeprecated -Wempty-body -Wtype-limits -Wshift-negative-value -Wno-unused-value \
-Wno-unused-parameter -Wno-missing-field-initializers -Wuninitialized -Wall -Wextra -Wno-unused-parameter \
-Wno-missing-field-initializers -Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral \
-Wpointer-arith -Wno-cast-qual -Wmissing-prototypes -Wunreachable-code -Wno-switch-default \
-Wreturn-type -Wmultichar -Wformat-security -Wno-ignored-qualifiers -Wno-sign-compare
LDFLAGS ?= -lm
BIN = ui_sevio
#Collect the files to compile
MAINSRC = ./main.c
include $(LVGL_DIR)/lvgl/lvgl.mk
include $(LVGL_DIR)/lv_drivers/lv_drivers.mk
UI_GEN_SRC = $(LVGL_DIR)/squareline/ui.c \
$(LVGL_DIR)/squareline/ui_img_wifi_img2_png.c \
$(LVGL_DIR)/squareline/ui_img_wifi_img_png.c \
$(LVGL_DIR)/squareline/ui_img_eth_img_png.c \
$(LVGL_DIR)/squareline/ui_img_frecce_d_r_png.c \
$(LVGL_DIR)/squareline/ui_img_logo_png.c \
$(LVGL_DIR)/squareline/ui_helpers.c
UI_SRC = $(LVGL_DIR)/ui/ui_update.c $(LVGL_DIR)/ui/ubus.c
CSRCS +=$(LVGL_DIR)/mouse_cursor_icon.c $(UI_GEN_SRC) $(UI_SRC)
OBJEXT ?= .o
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
OBJS = $(AOBJS) $(COBJS)
## MAINOBJ -> OBJFILES
all: cenv default
%.o: %.c
@$(CC) $(CFLAGS) $(INCLUDE_FLAGS) $(DEFINE_FLAGS) -c $< -o $@
@echo "CC $<"
default: $(AOBJS) $(COBJS) $(MAINOBJ)
$(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS) $(LIB_FLAGS)
clean:
rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
cenv:
@echo $(CFLAGS)