forked from lvgl/lvgl
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
58 lines (45 loc) · 924 Bytes
/
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
# Build LVGL on PinePhone Ubuntu Touch
# Define $(CSRCS)
LVGL_DIR := .
LVGL_DIR_NAME := .
include lvgl.mk
WAYLAND_CSRCS := \
demo/lv_demo_widgets.c \
wayland/lv_port_disp.c \
wayland/shader.c \
wayland/texture.c \
wayland/util.c
TARGETS:= wayland/lvgl
DEPS := lv_conf.h
CC := gcc
CCFLAGS := \
-g \
-I src/lv_core \
-D LV_USE_DEMO_WIDGETS
LDFLAGS := \
-Wl,-Map=wayland/lvgl.map \
-L/usr/lib/aarch64-linux-gnu/mesa-egl \
-lwayland-client \
-lwayland-server \
-lwayland-egl \
-lEGL \
-lGLESv2
MAINS := $(addsuffix .o, $(TARGETS) )
OBJ := \
$(MAINS) \
$(CSRCS:.c=.o) \
$(WAYLAND_CSRCS:.c=.o)
.PHONY: all clean
all: $(TARGETS)
clean:
rm -f $(TARGETS) $(OBJ)
$(OBJ): %.o : %.c $(DEPS)
$(CC) -c -o $@ $< $(CCFLAGS)
$(TARGETS): % : $(filter-out $(MAINS), $(OBJ)) %.o
$(CC) -o $@ \
-Wl,--start-group \
$(LIBS) \
$^ \
-Wl,--end-group \
$(CCFLAGS) \
$(LDFLAGS)