-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile_bak
executable file
·28 lines (24 loc) · 1.2 KB
/
makefile_bak
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
CXX = g++
CXXFLAGS = -std=c++11 -g -lm -Werror `pkg-config --cflags --libs opencv` # 附加参数 pkg-config --cflags --libs opencv 包含opencv所有lib和include,可以在cmd中输入pkg-config --cflags --libs opencv查看
#INC_PATH = -I /usr/local/include/ \
# -I /usr/local/include/opencv \
# -I /usr/local/include/opencv2 # 头文件查找路径
LIBS = -L /home/abcd/rcnn/sjtu_demo/project/rcnn/ \
-l caffe
# -l opencv_core \
# -l opencv_imgproc \
# -l opencv_highgui \
# -l opencv_imgcodecs # 链接库查找地址
SRCFILES = src/main.cpp # wildcard把 指定目录 ./ 下的所有后缀是cpp的文件全部展开。
OBJS = $(SRCFILES:.cpp=.o) # OBJS将$(SRCS)下的.cpp文件转化为.o文件
TARGET = main # 输出程序名称
all default: $(TARGET)
#$(TARGET): $(OBJS)
# $(CXX) $^ -o $@ $(INC_PATH) $(LIBS)
#
#%.o : main.cpp
# $(CXX) -c $(CXXFLAGS) $<
$(TARGET): $(OBJS)
$(CXX) $< $(CXXFLAGS) $(LIBS) -g -o $(TARGET)
clean:
rm -rf *.out *.o $(OBJS)