Optiboot (the Arduno UART bootloader) currently supports a couple dozen different target CPUs, using a makefile from the command line:
make atmega1284 UART=1 BAUD=RATE=115200 <more options>
Occasionally I run into people who would like to use Microchip Studio (nee Arduino Studio 7) to modify, build, and load their microcontroller. I have "faked" AS projects for the ATmega328p, ATmega328pb, and ATmega168pb Xplained Mini boards (three separate projects/solutions), but obviously this does not scale very well.
Is there a well-known technique for supporting multiple target CPUs and perhaps multiple program/debug tools from a single project? Normally a project seems to be pretty tied to a specific CPU/tool, and while you can change them in the project configuration, that's a relatively obscure operation. I guess that in theory, the CPU type doesn't even need to be "correct", since it's calling an external makefile to do the compile, but ... it does need to be correct for burn/debug operations...
(I guess: same question for MPLAB-X)