updated makefile to check obj. directory
makde it compile on linux
checking that outdir exisits