TARGET_linux makefile: consolidate common code

Summary:
There is a lot of common makefile code
in the arch specific target makefiles. This change
consolidates much of the common code.

Test Plan: win

Reviewers: randall.rushing, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D366