title: Makefile does not work on mac os x Mavericks
body: <p>I have a project, which uses opencv library. Today I have upgraded my Mac OS X Lion to Mavericks and now I am wondering why it does not compile anymore because of the following error:</p>
  
  <pre><code>c++ -O2 -g -Wall -fmessage-length=0    -c -o Hello.o Hello.cpp
  Hello.cpp:2:10: fatal error: 'opencv/cv.h' file not found
  #include "opencv/cv.h"
           ^
  1 error generated.
  make: *** [Hello.o] Error 1
  </code></pre>
  
  <p>Here's the code of Hello.cpp:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "opencv/cv.h"
  
  using namespace std;
  
  int main(){
      return 0;
  }
  </code></pre>
  
  <p>Here's my makefile:</p>
  
  <pre><code>CXXFLAGS =  -O2 -g -Wall -fmessage-length=0 
  
  OBJS =      Hello.o
  
  LIBS =  -lopencv_core -lopencv_imgproc -lopencv_calib3d -lopencv_video -lopencv_features2d -lopencv_ml -lopencv_highgui -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_gpu
  
  
  INCPATH = -I/usr/local/Cellar/opencv/2.4.6.1/include
  LIBPATH = -L/usr/local/Cellar/opencv/2.4.6.1/lib
  
  TARGET =    Hello
  
  $(TARGET):  $(OBJS)
      g++ $(INCPATH) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS) 
  
  
  all:    $(TARGET)
  
  
  clean:
      rm -f $(OBJS) $(TARGET)
  </code></pre>
  
  <p>I have to say that I can compile my project using terminal by typing:</p>
  
  <pre><code>g++ `pkg-config --cflags opencv` Hello.cpp -o Hello
  </code></pre>
  
  <p>and to be sure, this is what I get by running <code>pkg-config --cflags opencv</code> on terminal:</p>
  
  <pre><code>-I/usr/local/Cellar/opencv/2.4.6.1/include/opencv
  </code></pre>