use standard CPPFLAGS/LDFLAGS automake variables
ignore generated files
Merge pull request #1 from vapier/master

misc build fixes