The problem was that I used spaces instead of tabs.
$(PROG1): $(OBJ1) $(CC) $(CFLAGS) -o $(PROG1) $(OBJ1) ^^^ here
Thanks Jens and MadScientis for their help and advice.