On 4/2/10 7:04 AM, Jef Driesen wrote:
I also have a corresponding version.c file that has the same info, but
for use at runtime:
#include "version.h
const int mylib_version_major = MYLIB_VERSION_MAJOR;
const int mylib_version_minor = MYLIB_VERSION_MINOR;
const int mylib_version_micro = MYLIB_VERSION_MICRO;
This should not be a problem when you have the generated version.h. You
can just use the defines from version.h. The tricky thing is that
version.cc will not compile if version.h is not present (not generated
yet), so you need to have a dependency that version.h needs to be
generated before version.o is created.
Read the section 9.4 in Automake manual that explains the details clearly
http://sources.redhat.com/automake/automake.html#Sources