title: g++: fatal error: cannot specify -o with -c, -S or -E with multiple files
body: <p>I am trying to compile a library file using other library files. I am using the following line in my makefile to create gameobject.o:</p>
  
  <pre><code>lib/gameobject.o: src/gameobject.cpp src/vector.hpp lib/objectevent.o lib/sprite.o
  g++ $^ -c -o $@ $(SFML_FLAGS)
  </code></pre>
  
  <p>All the dependencies comile correctly, but I get the following error when it tries to compile gameobject.o:</p>
  
  <pre><code>g++: fatal error: cannot specify -o with -c, -S or -E with multiple files
  </code></pre>
  
  <p>I'm still a bit new to using make/separating compilation, so I'm not quite sure what I should do. Do I just have to compile it without setting an output? Do I have to compile gameobject.o without using any of my other .o files? If that's true, wouldn't compile times get pretty big for large objects if you can't compile libraries with other libraries? Or am I just reading this error completely wrong?</p>