And it is incomplete.
derp.o depends on derp.c and presumably the include file.
so the dependency for derp is derp.o, not derp.c - it doesn't matter where the .o comes from, only that it exist.
And normally, the `abunchofflags` would be specified by a "CFLAGS=...." which may be
A `bunchoflibs` is USUALLY specified using a "LIBS=..." and then use $(LIBS) on the build command.
As a bit of configuration options, the object files needed for derp can be collected
into a definition: DERPOBS=derp.o foo.o
This would change your Makefile to:
gcc -oderp $(DERPOBS)
derp.o: derp.c derp.h
This makes a simple update as the program expands - only additional object needs for the derp program as they get added to only one line. There are even ways to generate the list of header file dependencies automatically (http://www.gnu.org/software/make/man...epend_007d-284
) as the gnu C compiler has an option (-M) to list the header dependencies...
And allow make to do what it does best.