f1: f1.cpp f.h g++ -c -Wall -g f1.cpp f2: f2.cpp f.h g++ -c -Wall -g f.cpp
This makefile does not compile f2.cpp to f2.
f2.cpp
f2.
Is this the entire contents of your Makefile? If yes, then you're missing the all rule.
all
all: f1 f2 f1: dependencies intructions f2: dependencies intructions
Because make only processes the first target (goal). To do both add this as the first rule:
all: f1 f2