>> There are 2 issues I see: >> 1) Why would the Makefile.am below produce 2 commands compiling the >> same source file into 2 different directories? >> > > The two libtool commands are not exactly alike. The first command > generates position-independent code (PIC) to be used in your libtool > shared library. That's why the object file is placed in the .libs > directory. The second line doesn't use the -fPIC and -DPIC options. This > version of the object file is used in the traditional archive (static > library). The double compile comes from the use of Libtool. However, if > you don't use Libtool, you'll only get static libraries.
Ah! >> 2) One of those builds commands actually puts lcairo.o in the same >> directory as the Makefile, so I would assume that the rule lcairo.o >> would correspond to this step. >> > > Automake is a little too smart for us here. It won't generate a rule to > build a libtool object if you've already written one - even if it's only > a dependency rule (no commands). To fix this, place the dependency on > the source file, not on the object: > > src/lcairo.c : resource.qt > > I tested this and it works - here's my test code: It definitely does work! Thanks so much. The QT resources in my case or code generated files from the actual source files, so it makes sense to trigger the rules off of the sources themselves. I really appreciate the help. wes