forked from terryky/tflite_gles_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (56 loc) · 2.15 KB
/
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
59
60
61
62
63
64
65
66
67
68
MAKETOP = $(realpath ..)
include $(MAKETOP)/Makefile.env
TARGET = gl2objectron
SRCS =
SRCS += main.c
SRCS += tflite_objectron.cpp
SRCS += $(MAKETOP)/common/assertgl.c
SRCS += $(MAKETOP)/common/assertegl.c
SRCS += $(MAKETOP)/common/util_egl.c
SRCS += $(MAKETOP)/common/util_shader.c
SRCS += $(MAKETOP)/common/util_matrix.c
SRCS += $(MAKETOP)/common/util_texture.c
SRCS += $(MAKETOP)/common/util_render2d.c
SRCS += $(MAKETOP)/common/util_debugstr.c
SRCS += $(MAKETOP)/common/util_pmeter.c
SRCS += $(MAKETOP)/common/util_tflite.cpp
SRCS += $(MAKETOP)/common/winsys/$(WINSYS_SRC).c
OBJS += $(patsubst %.cc,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRCS))))
LDFLAGS +=
LIBS += -pthread
# for V4L2 camera capture
CFLAGS += -DUSE_INPUT_CAMERA_CAPTURE
CFLAGS += -DUSE_INPUT_CAMERA_CAPTURE2
SRCS += $(MAKETOP)/common/util_camera_capture.c
SRCS += $(MAKETOP)/common/util_v4l2.c
SRCS += $(MAKETOP)/common/util_drm.c
LIBS += -ldrm
#
# for FFmpeg (libav) video decode
#
ifeq ($(ENABLE_VDEC), true)
CFLAGS += -DUSE_INPUT_VIDEO_DECODE
CFLAGS += -DUSE_INPUT_VIDEO_DECODE2
FFMPEG_LIBS= libavdevice \
libavformat \
libavfilter \
libavcodec \
libswresample \
libswscale \
libavutil \
CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
LIBS += $(shell pkg-config --libs $(FFMPEG_LIBS)) -lm
SRCS += $(MAKETOP)/common/util_video_decode.c
endif
# ---------------------
# for TFLite
# ---------------------
TENSORFLOW_DIR = $(HOME)/work/tensorflow
INCLUDES += -I$(TENSORFLOW_DIR)
INCLUDES += -I$(TENSORFLOW_DIR)/tensorflow/lite/tools/make/downloads/flatbuffers/include
INCLUDES += -I$(TENSORFLOW_DIR)/tensorflow/lite/tools/make/downloads/absl
INCLUDES += -I$(TENSORFLOW_DIR)/tensorflow/lite/tools/make/downloads/eigen
INCLUDES += -I$(TENSORFLOW_DIR)/external/flatbuffers/include
INCLUDES += -I$(TENSORFLOW_DIR)/external/com_google_absl
LDFLAGS += -Wl,--allow-multiple-definition
include ../Makefile.include