I did this with a preprocessor on my merge_buffer branch:
https://github.com/degasus/dolphin/blob/merge_constants/Source/Core/VideoCommon/ConstantManager.h#L53
https://github.com/degasus/dolphin/blob/merge_constants/Source/Core/VideoCommon/Constants.h