What is the Makefile Target `.c.o` for?

chacham15 picture chacham15 · Feb 10, 2012 · Viewed 18k times · Source

Someone recently mentioned the target .c.o in Makefiles for cross compatability, but I fail to understand its purpose. Can anyone clarify?

Answer

Carl Norum picture Carl Norum · Feb 10, 2012

It's an old-fashioned suffix rule. The more up-to-date way to do it is to use a pattern rule:

%.o : %.c