-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (33 loc) · 996 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (33 loc) · 996 Bytes
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
SRCS = \
main.cxx
OBJS = $(subst .cc,.o,$(subst .cxx,.o,$(subst .cpp,.o,$(SRCS))))
TENSORFLOW_ROOT = $(shell go env GOPATH)/src/github.com/tensorflow/tensorflow
CXXFLAGS = -std=c++17 $(shell pkg-config --cflags opencv4)
LDFLAGS = -std=c++17
LIBS = -lboost_system -lpthread -lws2_32 -lmswsock $(shell pkg-config --libs opencv4)
TARGET = crow-tflite-object-detect
ifeq ($(OS),Windows_NT)
TARGET := $(TARGET).exe
TARGET_ARCH = windows_x86_64
else
TARGET_ARCH = linux_x86_64
endif
CXXFLAGS += -DMG_ENABLE_HTTP_STREAMING_MULTIPART=1 \
-I$(TENSORFLOW_ROOT) \
-I$(TENSORFLOW_ROOT)/tensorflow/lite/tools/make/downloads/flatbuffers/include
LIBS += -L$(TENSORFLOW_ROOT)/tensorflow/lite/tools/make/gen/$(TARGET_ARCH)/lib \
-ltensorflow-lite \
-lstdc++ \
-lpthread \
-ldl \
-lm
.SUFFIXES: .cpp .cxx .o
all : $(TARGET)
$(TARGET) : $(OBJS)
g++ $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
.cxx.o :
g++ -c $(CXXFLAGS) -I. $< -o $@
.cpp.o :
g++ -c $(CXXFLAGS) -I. $< -o $@
clean :
rm -f *.o $(TARGET)