fix platform dependant build and add .gitignore