I had to do something like that for ultrastar-ng. I created two different directories, called configure from inside each of them with the proper different parameters and had to duplicate the make and make install. Dunno if it's not elegan enough, but I didn't want to make it too complex. You might want to have a look at it. There's nothing special in it anyway.
Greetings, Miry