Native libraries rules in Makefile + more generic rules

Signed-off-by: Pouyan Heyratpour <P.Heyratpour@Gmail.Com>