Improved makefile to detecte OS

Signed-off-by: lg188 <lander.ghekiere@gmail.com>