Update Makefile

Hi,

These patches are required to support yrmcds many architectures.
Could you check and apply?