title: c makefile - no input file
body: <p>So here my code for a makefile :</p>
  
  <pre><code>    CC=gcc 
      CFLAGS= -g -W -Wall -o
      EXEC=program
      all :   $(EXEC)
      program:    apple.o cream.o cake.o  program.o
                  $(CC)   $(CFLAGS)   program apple.o cream.o cake.o  program.0
  
      program.o:  program.c   apple.o cream.o cake.o
                  $(CC)   $(CFLAGS)   program.c
  
      apple.o:    apple.c apple.h
                  $(CC)   $(CFLAGS)   apple.c apple.h
  
      cream.o:    apple.o cream.c cream.h
                  $(CC)   $(CFLAGS)   cream.c cream.h
  
      cake.o:     cake.c  cake.h  cream.o apple.o
                  $(CC)   $(CFLAGS)   cake.c  cake.h
  clean:
      -rm -rf *.o $(EXEC)
  </code></pre>
  
  <p>And im stuck with an error :
  <strong>*gcc: no input file
  make: *</strong>[program.o] Error 1*** </p>
  
  <p>Just to let you know.</p>
  
  <ul>
  <li>apple.c has -> #include "apple.h"</li>
  <li>cream.c has  -> #include "cream.h" and  #include "apple.h"</li>
  <li>cake.c has  -> #include "cake.h",   #include "apple.h" &amp; #include "cream.h"</li>
  <li>program.c has -> #include "cake.h",   #include "apple.h" &amp; #include "cream.h"</li>
  </ul>
  
  <p>I want to be able to create a makefile that will produce my exec 'program'. And i've read that i can use de -I flag which will look into the directory for the include header. But when i add the -I in my CFLAGS, it's getting worst</p>
  
  <p>Thank you very much.</p>