========================= Writing Minimal Makefiles ========================= - Ian! D. Allen - www.idallen.com The "make" program has many default rules built-in. Don't duplicate rules that make already knows. Here is a minimal makefile to buld "foo" from "foo.c" and "bar" from "bar.C" (C++): # minimal Makefile, using default rules # all: foo bar foo: foo.c bar: bar.C Note that no compile or link lines are needed; we use the defaults. A slightly more indirect example (only works for C, not C++ source): # minimal Makefile, using default rules # all: foo foo: foo.o