Instead of checking the target platform in the mk file use the common pattern of providing a mk file for each platform. Fixes #1236.