title: How to "make" an SDL project on linux?
body: <p>Makefiles are quite confusing to me. I am attempting to "make" my project that I have worked on in Windows. The confusing part is actually constructing the make file from scratch. I would am trying to also link to the SDL2 library, and that is in a '.a' format.</p>
  
  <p>Here is my code for the make file so far, I have tried multiple versions, and this is the latest:</p>
  
  <pre><code>CXX = gcc
  OUT = Engine
  SRC =Software-Rendering/src/
  SDL_INCLUDE_DIR =Software-Rendering/lib/SDL2/include/SDL/
  LIB_DIR =Software-Rendering/lib/SDL2/x86/linuxLib/
  
  SDL = -l${LIB_DIR}libSDL -l${LIB_DIR}/libSDL2main
  
  CPP_FILES =Bitmap.cpp Main.cpp Vector3.cpp Window.cpp
  H_FILES =Bitmap.h ErrorReport.h Vector3.h Window.h
  
  O_FILES = Bitmap.o ErrorReport.o Main.o Vector3.o Window.o
  
  all: $(OUT)
  
  $(OUT): $(O_FILES)
      $(CXX) -o $@ $^ ${SDL}
  
  #Making all of the object files down
  $(O_FILES): $(H_FILES)
      $(CXX) -c $(CPP_FILES)
  #Make sure we can easily clean up the directory
  clean:
      rm -f Engine ${O_FILES}
  
  clean_obj:
      rm -f ${O_FILES}
  </code></pre>
  
  <p>I decided to put the ".a" files in a special directoy in my project so whenever someone clones my repository on github all of the files for compiling and linking are already there.</p>
  
  <p>Why isn't this working and how can I make it work?</p>