title: Using make to move .o files to a separate directory
body: <p>I've tried numerous attempts to move my <code>.o</code> files to my <code>obj</code> folder, but no matter what I do, it simply just doesn't work. </p>
  
  <p>Judging from the makefile provided, what is the best method to move <code>.o</code> files to a specified folder?</p>
  
  <pre><code>BIN = bin/
  OBJ = obj/
  TARGET = opengl_03
  DEPS = main.o  displayinit.o initializer.o algorithms.o matrix3f.o window.o vertex3.o
  CC = g++
  CFLAGS = -g 
  LIBS = -lglut -lGLEW -lGL 
  INCLUDEPATH = -L/usr/include/ -L/usr/lib/ -L/usr/lib/x86_64-linux-gnu/
  
  $(TARGET) : $(DEPS)
      $(CC) $(CFLAGS) -o $(BIN)$(TARGET) $(DEPS) $(LIBS) $(INCLUDEPATH) 
  
  displayinit.o : displayinit.cpp displayinit.h
      $(CC) $(LIBS) $(INCLUDEPATH) -c displayinit.cpp &amp;&amp; mv displayinit.o $(OBJ)displayinit.o
  initializer.o : initializer.cpp initializer.h
      $(CC) $(LIBS) $(INCLUDEPATH) -c initializer.cpp $(OBJ)
  algorithms.o : algorithms.cpp algorithms.h
      $(CC) -c algorithms.cpp $(OBJ)
  matrix3f.o : matrix3f.cpp matrix3f.h
      $(CC) $(LIBS) $(INCLUDEPATH)  -c matrix3f.cpp $(OBJ)
  vertex3.o : vertex3.cpp vertex3.h
      $(CC) $(LIBS) $(INCLUDEPATH)  -c vertex3.cpp $(OBJ)
  window.o : window.cpp window.h
      $(CC) $(LIBS) $(INCLUDEPATH) -c window.cpp $(OBJ)
  main.o : main.cpp
      $(CC) $(LIBS) $(INCLUDEPATH) -c main.cpp $(OBJ)
  </code></pre>