OpenCV 多文件编译的Makefile编写

Demo Makefile for OpenCV

这里给出OpenCV的makefile的demo

遇到一个坑 ' is not `

呵呵...

之前写的makefile会遇到这样的报错

OpenCV 多文件编译的Makefile编写

郁闷了好久...

特别注意`*****`

*旁边的符号不是单引号,而是键盘Esc下面的那个键!

demo makefile:

SOURCE_FILE:= get_semi_win.c semi_inverse_dehazing.c

OBJECT_FILE:= get_semi_win.o semi_inverse_dehazing.o

CFLAGS = -Wall -Wconversion -O3 `pkg-config --cflags opencv`

LIBS = `pkg-config --libs opencv`

complie:
 gcc $(CFLAGS) -c $(SOURCE_FILE) $(LIBS)
link:
 gcc $(CFLAGS) $(OBJECT_FILE) -o ./a.out $(LIBS)

clean:
 rm -rf ./*.o ./a.out

--------------------------------------分割线 --------------------------------------

--------------------------------------分割线 --------------------------------------

OpenCV的详细介绍:请点这里
OpenCV的下载地址:请点这里

相关推荐