Can you compile a game in U4 both in directx and opengl?

I don’t know, I’m not expert at all, but would it be possible?
If yes then would the game run also on old dx9/dx10 only graphic cards?