-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (33 loc) · 2.1 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
#all:
# g++ -std=c++11 -DUSE_BOOST ipc.cpp face_recog/age_gender_classify.cpp face_recog/face_recognition.cpp face_recog/tensor_util.cpp -o ipc -I/usr/local/include/tf -I/usr/local/include/tf/bazel-genfiles -I/root/Documents/tf_jiang/tensorflow-master/bazel-tensorflow-master/external/nsync/public -I/home/tony/work/eigen/eigen -L/usr/local/lib/libtensorflow_cc `pkg-config --cflags --libs opencv protobuf` -ltensorflow_cc -ltensorflow_framework -pthread -lboost_regex
# #g++ -std=c++11 -DUSE_BOOST ipc.cpp -o ipc -lopencv_core -lopencv_imgproc -lopencv_highgui -pthread -lboost_regex
CXXFLAGS = -std=c++11 -Wall -Wno-strict-aliasing -Wno-unused-variable
#包含头文件路径
SUBDIR = $(shell ls ./src -R | grep /)
SUBDIRS = $(subst :,/,$(SUBDIR))
#TODO: move to dedicated folder
INCPATHS += -I./ -I./include -I/usr/local/include/tf -I/usr/local/include/tf/bazel-genfiles -I/root/Documents/tf_jiang/tensorflow-master/bazel-tensorflow-master/external/nsync/public -I/home/tony/work/eigen/eigen -L/usr/local/lib/libtensorflow_cc
SOURCE = $(foreach dir,$(SUBDIRS),$(wildcard $(dir)*.cpp))
SOURCE += face_recog/age_gender_classify.cpp face_recog/face_recognition.cpp face_recog/tensor_util.cpp
VPATH = $(subst : ,:,$(SUBDIR))./
OBJS = $(patsubst %.cpp,%.o,$(SOURCE))
OBJFILE = $(foreach dir,$(OBJS),$(notdir $(dir)))
OBJSPATH = $(addprefix obj/,$(OBJFILE))
LDFLAGS_HICOM += -L./lib -lhcnetsdk -L./lib/HCNetSDKCom -lhpr -lHCCore -lX11
LDFLAGS_CV += `pkg-config --cflags --libs opencv protobuf`
LDFLAGS_CV += -pthread -L/usr/lib/x86_64-linux-gnu -lboost_regex
LDFLAGS_CV += -ltensorflow_cc -ltensorflow_framework
#for curl
LDFLAGS_JSON_CURL += -lcurl -DENABLE_JSON_POST
LDFLAGS += $(LDFLAGS_HICOM) $(LDFLAGS_CV) $(LDFLAGS_JSON_CURL)
EXE = ./ipc
$(EXE): $(SOURCE)
g++ -std=c++11 -DUSE_BOOST -DRESET_CONFIG -o $(EXE) $(SOURCE) $(INCPATHS) $(LDFLAGS) -DIPC
#g++ -std=c++11 -DUSE_BOOST -o $(EXE) $(SOURCE) $(INCPATHS) $(LDFLAGS) -DIPC
.PHONY:clean all
clean:
rm -rf $(OBJFILE)
rm -rf $(EXE)
all: $(EXE)
debug: src/jsonAPI.cpp
g++ -std=c++11 -DUSE_BOOST -DDEBUG -o jsonAPI src/jsonAPI.cpp $(INCPATHS) $(LDFLAGS) -DIPC