This commit deduplicates some of the Makefile rules used to compile C files. Rather than having one such rule per Makefile for each directory containing C files, the relevant rules are moved to Makefile.common.in.