forked from floe/backscrub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (25 loc) · 1019 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
CFLAGS = -Ofast -march=native -fno-trapping-math -fassociative-math -funsafe-math-optimizations -Wall -pthread
LDFLAGS = -lrt -ldl
# TensorFlow
TFBASE=../tensorflow.git
TFLITE=$(TFBASE)/tensorflow/lite/tools/make/
CFLAGS += -I $(TFBASE) -I $(TFLITE)/downloads/absl -I $(TFLITE)/downloads/flatbuffers/include
LDFLAGS += -L $(TFLITE)/gen/linux_x86_64/lib/ -ltensorflow-lite -ldl
# git clone -b v2.1.0 https://github.com/tensorflow/tensorflow $(TFBASE)
# cd $(TFBASE)/tensorflow/lite/tools/make
# ./download_dependencies.sh && ./build_lib.sh
# OpenCV
ifeq ($(shell pkg-config --exists opencv; echo $$?), 0)
CFLAGS += $(shell pkg-config --cflags opencv)
LDFLAGS += $(shell pkg-config --libs opencv)
else ifeq ($(shell pkg-config --exists opencv4; echo $$?), 0)
CFLAGS += $(shell pkg-config --cflags opencv4)
LDFLAGS += $(shell pkg-config --libs opencv4)
else
$(error Couldn't find OpenCV)
endif
deepseg: deepseg.cc loopback.cc
g++ $^ ${CFLAGS} ${LDFLAGS} -o $@
all: deepseg
clean:
-rm deepseg