title: What's the difference between having a library as a dependency in a makefile vs without the dependency symbol
body: <p>I'm quite new to makefiles, and I'm wondering what exactly is the role of the library in this format:</p>
  <pre><code>app: app.o mylibrary.a
  $(LD) -o $@ $(LDFLAGS) app.o mylibrary.a
  </code></pre>
  <p>What I usually see would be something like this:</p>
  <pre><code>app: app.o
  $(LD) -o app $(LDFLAGS) $^ mylibrary.a
  </code></pre>
  <p>My understanding for this format is that the executable will be made from the <code>app.o</code> file, which has a dependency on <code>mylibrary.a</code>.</p>
  <p>I can't quite understand the difference/meaning of the first version though.</p>