Use multiple build targets. To do this, first create a project that contains all of your files, say WonderBoard1. In the Project window, switch from files view to the target view by clicking on the Target tab. The project window displays the project's target name which is usually with the name of the project, WonderBoard1. Now choose Project > Create Target. A New Target dialog appears, which you can name, say "Wonderboard2". Click on Clone Existing Target to pick up all of the files and settings from the old target (WonderBoard1).
Switch back to the Files view in the Project window by clicking the Files tab. Select the WonderBoard2 from drop-down menu. Now, go to the target column in the project window and point and click to select or deselect the files needed to build the program for WonderBoard2. Go into the settings panels and make any changes, especially to the output file name. Now use the target menu to Switch back to the WonderBoard1 target, and select the files required to build a program for the WonderBoard1. Don't forget to adjust its settings panels, too, particularly the output file name.
Now you can edit the common source files, then pick the WonderBoard1 project and build the program for the WonderBoard1. If you've adjusted the settings panels properly, it will make a files named WonderBoard1.elf, or WonderBoard1.s19... After you've built that program, use the target menu to switch to the WonderBoard2 target, and do your second build. Again, if you've made your settings properly, you'll get a file named WonderBoard2.elf or WonderBoard2.s19, that uses the code unique to the WonderBoard2.
---Tom