Add ability to produce retargeted modules for compilation

This simplifies the creation of unit tests on pic12 and will be
very helpful for pic24 as well.