title: Makefile with different header directories?
body: <pre><code>//Root
  Main.c
  makefile
  objs/  //I want to store the .o files here if possible.
  refs/
      - header1.h
      - header1.c
      - up to 8 headers
  </code></pre>
  
  <p>So this is my file structure, I know it's not the best but it's just for a school project. The header files are included in the Main.c,</p>
  
  <pre><code>CC = gcc
  
  INCLUDES = -I/refs
  
  CFLAGS = -g $(INCLUDES)
  
  ODIR = /objs
  
  HLOC = /refs
  
  main.o: main.c 
      $(CC) $(CFLAGS) main.c -o $(wildcard *.o)
  
  main: main.o 
      $(CC) $(CFLAGS) main.c -o main
  
  #clean:
      #rm $(wildcard *.o) 
  </code></pre>
  
  <p>I am unsure how to actually do this, this is what I have so far but I unsure how to proceed or how to get this to work. I have searched extensively and cannot find an answer.</p>
  
  <p>Thanks!</p>