OSX compatible compilation script