So, I've been all over the Googleverse trying to find a solution to this one. I have created a library of comms for my client's products, but I need to compile the library with a different definition for the serial port depending on what product is being built. Some of this junk runs on Due, some on Mega, some on Pro Mini. On the Due or Mega the control comms may run on Serial1, but on the Pro Mini there is only Serial.
How can I define the serial port used by the product at compile time? I want to stay within the IDE and not have to drop down into a regular CLI build environment with Make and everything else. The idea here is to leave the development in a state that any Arduino-capable clown can pick it up and run with it.