Check platform type in the global makefiles

export the APPLE variable used in the souce if we are on apple