That won't always work, because often there are OS specific files. E.g. different implementations of "mmap" for Unix and Windows or strlcmp and snprintf implementations for platforms that don't provide them their self.
Also often certain headers need to be generated by the build system ("config.h.in" for version information, "export.h.in" for export macros).
Download the source package and open it in NetBeans! For what I needed clicking build JUST WORKED. For my purposes it was a short trip to adding some new arg commands and modifying functionality, then building and packaging it back into a .deb ready to go. I'm not sure if this is still the case, but NetBeans was pretty fantastic for this just 2 years ago.