-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile-lvgl
63 lines (48 loc) · 1.69 KB
/
makefile-lvgl
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
# VEXcode makefile 2019_03_26_01
# show compiler output
VERBOSE = 0
# include toolchain options
include lvgl-mk/mkenv.mk
# location of the project source cpp and c files
SRC_C = $(wildcard src/lvgl-main.cpp)
SRC_C += $(wildcard src/*.c)
SRC_C += $(wildcard src/*/*.c)
SRC_C += $(wildcard include/lvgl/src/*.c)
SRC_C += $(wildcard include/lvgl/src/*/*.c)
SRC_C += $(wildcard include/lvgl/src/*/*/*.c)
SRC_C += $(wildcard include/lvgl/src/*/*/*/*.c)
SRC_C += $(wildcard include/lvgl/src/*/*/*/*/*.c)
OBJA = $(addprefix $(BUILD)/, $(addsuffix .o, $(basename $(SRC_C))) )
OBJ = $(addprefix $(BUILD)/, $(addsuffix .o, $(basename $(SRC_C))) )
# location of include files that c and cpp files depend on
SRC_H = $(wildcard include/*.h)
SRC_H += $(wildcard include/*/*.h)
SRC_H += $(wildcard include/*/*/*.h)
SRC_H += $(wildcard include/*/*/*/*.h)
SRC_H += $(wildcard include/*/*/*/*/*.h)
# additional dependancies
SRC_A = makefile
# project header file locations
INC_F = include . include/lvgl include/lvgl/src
# headers needed to use library
LV_SRC_H += $(wildcard include/lvgl/lvgl.h)
LV_SRC_H += $(wildcard include/lvgl/src/*.h)
LV_SRC_H += $(wildcard include/lvgl/src/*/*.h)
LV_SRC_H += include/lv_conf.h
LV_SRC_H += lvgl_inc.h
LV_DST_H = $(addprefix $(BUILD)/include/, $(LV_SRC_H) )
LV_DST_H += $(BUILD)/include/lv_conf.h $(BUILD)/include/lvgl_inc.h
$(BUILD)/include/%: %
$(Q)$(MKDIR)
$(Q) $(call copyfile,$^, $@)
vpath %.h include/lvgl/ include/
# override proj name
PROJECTLIB = liblvgl
# build targets
all: $(BUILD)/$(PROJECT).bin $(BUILD)/$(PROJECTLIB).a inc
# copy lvgl header files
.PHONY: inc
inc: $(LV_DST_H)
$(ECHO) "Copy headers to build folder"
# include build rules
include lvgl-mk/mkrules.mk