-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
42 lines (31 loc) · 965 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
#
# 8ms Makefile
#
TOPDIR := ${shell pwd}
LVGL_DIR_NAME := lvgl
LVGL_DIR := ${shell pwd}
include SSD20X/config.mk
CFLAGS += -I$(LVGL_DIR)/
CFLAGS += -DLV_CONF_INCLUDE_SIMPLE -DLV_EX_CONF_INCLUDE_SIMPLE
CFLAGS += -I$(TOPDIR)/include/ -I$(TOPDIR)/include/lvgl/
CFLAGS += -I$(TOPDIR)/extra/include/ -I$(TOPDIR)/extra/include/freetype2
MSRCS += $(shell find . -maxdepth 1 -name \*.c)
include $(LVGL_DIR)/main/8ms.mk
include $(LVGL_DIR)/control/control.mk
include $(LVGL_DIR)/tty/tty.mk
include $(LVGL_DIR)/blockly/blockly.mk
OBJEXT ?= .o
MOBJS = $(MSRCS:.c=$(OBJEXT))
DLIBS := -llvgl -lubus -lubox -lblobmsg_json -ljson-c -lcrypto -lwtinfo -lcJSON -lm -lbz2 -lz -lpng -lfreetype -lm
all: clean prepare demo
prepare:
@mkdir -p build bin
%.o: %.c
@$(CC) $(CFLAGS) -c -o build/$@ $^
@echo "CC $^"
demo: $(MOBJS)
$(CC) -o bin/$@ build/*.o -L./lib -L$(TOPDIR)/extra/lib/ $(DLIBS)
cp bin/$@ bin/$@_debug
$(STRIP) --strip-all bin/$@
clean:
@rm -rf build bin