title: setup SDL2 mac through command line
body: <p>I'm trying to setup SDL2 to use with g++, a text editor and terminal.
  I have my SDL2.framework in /Library/Frameworks.
  I have a folder on my desktop named testsdl which contains two files:</p>
  
  <p>1) main.cpp</p>
  
  <p>2) makefile</p>
  
  <p>when I type make I get the following error:main.cpp:2:10: fatal error: 'SDL2/SDL.h' file not found.
  here is a copy of my makefile</p>
  
  <pre><code>CXX = g++
  SDL = -framework SDL2
  
  CXXFLAGS = -Wall -c -std=c++11 -I ~/Library/Frameworks/SDL2.framework/Headers
  LDFLAGS = $(SDL) -F /Library/Frameworks -F ~/Library/Frameworks/
  EXE = SDL_Lesson0
  
  all: $(EXE)
  
  $(EXE): main.o
      $(CXX) $(LDFLAGS) $&lt; -o $@
  
  main.o: main.cpp
      $(CXX) $(CXXFLAGS) $&lt; -o $@
  
  clean:
      rm *.o &amp;&amp; rm $(EXE)
  </code></pre>
  
  <p>and here is a copy of main.cpp:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;SDL2/SDL.h&gt;
  
  int main(int, char**)
  {
    if (SDL_Init(SDL_INIT_VIDEO) != 0)
    {
      std::cout &lt;&lt; "SDL_Init Error: " &lt;&lt; SDL_GetError() &lt;&lt; std::endl;
      return 1;
    }
    SDL_Quit();
    return 0;
  }
  </code></pre>
  
  <p>I tried changing the #include to "SDL2/SDL.h" or just  or any other possible combination. I had no problem setting it up through Xcode but can't figure out how to do it without using an IDE.</p>
  
  <p>a second part of the question is:
  if I wanted to include the frameworks in the project folder itself so I can later distribute the binaries to people who do not have SDL on their machines how would I do that?
  thanks.</p>