Moving libraries define to sketch

I have I library that uses two different timers depending on which arduino it is loaded on to. (one is a mega and one is a pro)

the mega uses timer five and the pro uses timer one.

right now I have to comment out a line in the libraries .cpp file when I want to load the sketch onto the pro, and then un comment the line when I load it to the mega.

not really a big deal, but it would be easier just to put the defines in my sketches. But, I read that the two files are compiled first, then linked together... so I don't guess that would work....

Is there another away to accomplish this though?

Hi Qdeathstar

This may do the trick ...

#if defined(__AVR_ATmega2560__)
// code for Mega here