how to build opencv in makefile.am using automake
hi, i am trying to create a makefile.am with automake and in the makefile i want to add opencv library. i tried it in the following way but it does not work. Can you point out what is wrong in my code?
AM_CFLAGS = -Wall -I/usr/local/include/opencv
AM_LDFLAGS = -lm -L/usr/local/lib
if DEBUG
AM_CFLAGS += -O0 -ggdb
else
AM_CFLAGS += -O3
AM_LDFLAGS += -s endif
AM_CXXFLAGS = $(AM_CFLAGS)
bin_PROGRAMS = a
a_SOURCES = xx.c xxx.c a.c aa.c aaa.c aaaa.c aaaaa.c
-I/usr/local/include (without the opencv at the end)
also, why not use cmake ?
Thanks for your answer. I got this program from supervisor and it contains autogen.sh automake.am in the package so that icant use cmake. This program aims to detect chessboard corner but all the algorithms and functions are written by the author, now i want to use some functions in opencv to improve the performance such like load image. gaussian blur etc. I tried to eliminate the opencv, but i doesnot work either. always i got this errors " undefined reference to
cvLoadImage'" " undefined reference to
cvNamedWindow'".