TARGET_linux makefile: consolidate common code