-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
29 lines (22 loc) · 913 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
### Makefile for building tensorflow application
# link pre-build libtensorflow_cc.so to your personal build project
# param:
# INCLUDES: -I, remember to include eigen3 and tf libs
# LDLIBS : -L path of folder where libtensorflow_cc.so exist
# ACTUAL_LIBS: -l name of actual lib(name).so
THIRD_PARTY = ./third_party
SOURCE_DIR = ./src
BIN_DIR = .
CXX = g++-4.8 -std=c++11
LDFLAGS = -g -Wall -Wshadow -Wno-sign-compare -w -O2 #-DEIGEN_USE_MKL_ALL
INCLUDES = -I$(THIRD_PARTY)/include/tensorflow \
-I$(THIRD_PARTY)/include/tensorflow/third_party/eigen3
ACTUAL_LIBS = -L$(THIRD_PARTY)/lib -ltensorflow_cc
INPUT_FILE = $(SOURCE_DIR)/tensorflow_model_decoder_main.cpp \
$(SOURCE_DIR)/tensorflow_model_decoder.cpp
OBJET_FILE = $(BIN_DIR)/tensorflow_model_decoder
all: tfcpp_demo
tfcpp_demo:
$(CXX) -o $(OBJET_FILE) $(INPUT_FILE) $(INCLUDES) $(LDFLAGS) $(LDLIBS) $(ACTUAL_LIBS)
clean:
rm $(OBJET_FILE)