Change Code based on build target? And custom build targets

Hi all.
I have three questions:
A) How (or can I even) can I make custom build targets? I.e.: For the LyraGame there’s an EOS target (couldn’t get it to work) but I have a source build of UE4 so could I just make a new target?
B) How can I change the code of my game based on the build target? I.e.: If server do this, if client do this
C) How can I change code based on build platform? I.e.: if Android use this subsystem if Apple use this one (I’m assuming I can use configs, just not too sure how)