commit | author | age
|
b64b1d
|
1 |
|
G |
2 |
CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf- |
|
3 |
CC = ${CROSS_COMPILE}gcc |
|
4 |
|
|
5 |
CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized |
|
6 |
CFLAGS += -O3 -g3 -I./ -I ./libs_lvgl/ |
|
7 |
|
|
8 |
LDFLAGS+=-L ./libs_lvgl/libs/ -llv_demos -llv_drivers -llvgl |
|
9 |
|
|
10 |
BIN = lvgl_demo |
|
11 |
|
|
12 |
MAINSRC = lvgl_demo.c |
|
13 |
|
|
14 |
VPATH = |
|
15 |
OBJEXT ?= .o |
|
16 |
|
|
17 |
AOBJS = $(ASRCS:.S=$(OBJEXT)) |
|
18 |
COBJS = $(CSRCS:.c=$(OBJEXT)) |
|
19 |
|
|
20 |
MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) |
|
21 |
|
|
22 |
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) |
|
23 |
OBJS = $(AOBJS) $(COBJS) |
|
24 |
|
|
25 |
## MAINOBJ -> OBJFILES |
|
26 |
|
|
27 |
all: libs clean default |
|
28 |
cp ${BIN} /tftp |
|
29 |
|
|
30 |
libs: |
|
31 |
cd libs_lvgl && ./build.sh ${CROSS_COMPILE} |
|
32 |
|
|
33 |
%.o: %.c |
|
34 |
@$(CC) $(CFLAGS) -c $< -o $@ |
|
35 |
@echo "CC $<" |
|
36 |
|
|
37 |
default: $(AOBJS) $(COBJS) $(MAINOBJ) |
|
38 |
$(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS) |
|
39 |
|
|
40 |
clean: |
|
41 |
rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ) |
|
42 |
|
|
43 |
distclean: clean |
|
44 |
rm -rf cscope* tags |
|
45 |
cd libs_lvgl && ./build.sh clean |
|
46 |
|