title: makefiles and linking a library in a different folder
body: <p>I've search around a bit on StackOverflow and tried a few suggestions but as of yet nothing has solved the problem.</p>
  
  <p>I'm making a makefile for a school project and as part of my project I'm generating a static library and linking against it. The compiler throws an error when it gets to a header include in the static library. The code for that is just <code>#include "StringUtil.h"</code></p>
  
  <p>So in the makefile I have these relevant parts of code</p>
  
  <pre><code>LINKFLAGS=-Llib/ -lHTMLtools
  
  bin : lib $(BIN_FILE)
  lib : $(LIB_OBJ_FILES)
      ar r lib/libHTMLtools.a $(LIB_OBJ_FILES)
  
  $(BIN_FILE) : $(OBJ_FILES) #This is only obj/crawler.o for now
      g++ -o bin/crawler obj/crawler.o
  obj/crawler.o : src/crawler.cpp inc/crawler.h
      g++ -c -static $(LINKFLAGS) -o obj/crawler.o -I inc src/crawler.cpp
  </code></pre>
  
  <p>so whenever I run the <code>make bin</code> command it generates <code>lib.libHTMLtools.a</code> as expected but when it gets to the<br>
  <code>g++ -c -static $(LINKFLAGS) -o obj/crawler.o -I inc src/crawler.cpp</code><br>
   line it returns this error.</p>
  
  <pre><code>src/crawler.cpp:2:24: fatal error: StringUtil.h: No such file or directory compilation terminated.
  </code></pre>
  
  <p>Any help or advice will be appreciated!</p>