555 guy, if you look at my $50 Robot code
you will notice a section called CONFIGURE PORTS in the SoR_Utils.h file.
In that same file you will see lines such as PORT_OFF(PORTD, 4);
In the makefile file you will notice a line that says:
# MCU name
MCU = atmega8
If you modify each depending on your needs, your code should work for any AVR.