AVR-GCC: Ports Undeclared when compiling
I'm not familiar with AVRs but the compiler is telling you that it can't find where "PORTC" etc are defined.  Normally these definitions are included via a header file, and from your post I would suggest that it is likely avr/io.h.  You will need to take a look at this file and determine that it is the source of these missing definitions.  Further more, the first error that is encountered states that "device type not defined".  This means that this header file requires a #define to inform it which code to include for the processor that you are using.  This would normally be provided to the compiler via a -D option.

Seeing that you have had this working on windows under AVR studio, I suggest that you dig into the compiler settings within the GUI or examine the console output and find out exactly what is being passed to the compiler under windows so that you can copy the settings in your custom build under linux.