|
CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
|
CC = ${CROSS_COMPILE}gcc
|
|
CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized
|
CFLAGS += -O3 -g3 -I./ -I ./libs_lvgl/
|
|
LDFLAGS+=-L ./libs_lvgl/libs/ -llv_demos -llv_drivers -llvgl
|
|
BIN = lvgl_demo
|
|
MAINSRC = lvgl_demo.c
|
|
VPATH =
|
OBJEXT ?= .o
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
OBJS = $(AOBJS) $(COBJS)
|
|
## MAINOBJ -> OBJFILES
|
|
all: libs clean default
|
cp ${BIN} /tftp
|
|
libs:
|
cd libs_lvgl && ./build.sh ${CROSS_COMPILE}
|
|
%.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)
|
|
distclean: clean
|
rm -rf cscope* tags
|
cd libs_lvgl && ./build.sh clean
|
|