title: Make file not working for boost
body: <p>I am using the following structure for a Makefile:</p>
  
  <pre><code>OBJECTS := time.o
  PROGRAM := time
  CPPFLAGS += -Iusr/include/boost_1_49_0 -Lusr/include/boost_1_49_0/stage/lib
  CXXFLAGS := -Wall -ggdb3
  LDFLAGS += -lboost_date_time
  $(PROGRAM) : $(OBJECTS)
  g++ -o time time.cpp
  
  clean :
  rm $(PROGRAM) $(OBJECTS)
  </code></pre>
  
  <p>But when I enter make, it gives me lots of errors - including:</p>
  
  <pre><code>undefined reference to `boost::gregorian::greg_month::as_short_string() const' time.cpp:
  (.text._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatIcEEcE12format_monthERKS3_RSo[boost::date_time::month_formatter&lt;boost::gregorian::greg_month, boost::date_time::simple_format&lt;char&gt;, char&gt;::format_month(boost::gregorian::greg_month const&amp;, std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;)]+0x56):
      undefined reference to `boost::gregorian::greg_month::as_long_string() const'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>When I use <code>g++ -Wall -Iusr/include/boost_1_49_0 -Lusr/include/boost_1_49_0/stage/lib -o time time.cpp -lboost_date_time</code>, the code compiles fine so something is wrong with my Makefile. Please help. Note: I tried placing the <code>-L &lt;directory&gt;</code> flag in the <code>LDFLAG</code> variable but that didn't work either.</p>