Hello,
> Any ideas? how should I write Makefile.am so this doesn't happen?
I cannot solve your original, problem... but here is how I build subdirectories: "convenience libraries"
You have subdirectories in this project of yours because you need to organize the sources into groups. Well, you could make each group into a convenience library, and then link them at the end (the top directory will be build last). This does *not* mean you will have to install libraries.
For example:
SUBDIRS = store colors ktoon_SOURCES = main.cpp ktoon_LIBADD = store/libstore.la colors/libcolors.la
In store/Makefile.am
noinst_LTLIBRAIRES = libstore.la libstore_la_SOURCES = animation.cpp brush.cpp camera.cpp
I hope you find this useful :-)
Andre Caldas.