title: How do I specify in a Makefile.am script that I only want to compile object .o files?
body: <p>I have a <code>Makefile.am</code> which will be responsible for building a final application binary:</p>
  
  <pre><code>project/src/Makefile.am
  </code></pre>
  
  <p>Also in the src directory is a sub-directory called <code>ctrnn</code> which contains an additional <code>Makefile.am</code>:</p>
  
  <pre><code>project/src/ctrnn/Makefile.am
  </code></pre>
  
  <p>Now, <code>ctrnn/Makefile.am</code> should only generate object <code>.o</code> files with the idea being that the top-level <code>Makefile.am</code> should use the object files generated in subdirectory <code>ctrnn</code> to build the binary.</p>
  
  <p>This is the <code>ctrnn/Makefile.am</code>:</p>
  
  <pre><code>SOURCES = network.cpp\
      neuron.cpp
  
  AM_CPPFLAGS=  @CXXFLAGS@
  </code></pre>
  
  <p>Based on this <code>Makefile.am</code> file, I want to end up with network.o and neuron.o. I am generating the according <code>Makefile</code> using Automake etc, yet when I try and then execute the make file, it doesn't do anything and just says:</p>
  
  <pre><code>make: Nothing to be done for `all'
  </code></pre>
  
  <p>I know why this is, I need to specify the build target. But how do I do this in the <code>ctrnn/Makefile.am</code> script given that I don't want to build a binary which would require <code>bin_PROGRAMS</code> but actual object files <code>network.o</code> and <code>neuron.o</code>?</p>
  
  <p>(Note if I do specify a bin_PROGRAMS name, it rightly ends up complaining of an undefined reference to main).</p>
  
  <p>What am I do wrong?</p>