The example code is NOT an Arduino library, nor is it an Arduino sketch. It is an ATmega program. It will take some translation to turn it into an Arduino sketch.
Perhaps you should Google to see if someone has produced sample code for the Arduino.
It's actually a WinAVR package (according to the Makefile).
You could use it as a basis for writing your own library, but given that you couldn't even recognize that it wasn't a library, I'd start with something simpler.
Ah I thought ATmega328 refered to the chip used on an arduino uno. I will stop trying to get this to work and try a new approach, back to the reference section... Thanks