Anyway, I want to thank you. That Makefile was really useful. I now understand how it all works.
Pretty much the only thing it doesn't do that the IDE does is auto prototypes, "hot linking" of libraries and burning the bootloader (but there's already a makefile for that). So yeah, use at will!