Wes, On 6/20/2010 2:14 PM, Wesley Smith wrote: > How does one do this kind of thing when the source file is specified > in a subfolder? > INCLUDES = -I/usr/include/lua5.1 -I/usr/include/cairo > -I/usr/include/directfb -I/usr/include/freetype2 > > lib_LTLIBRARIES = cairo.la > cairo_la_LDFLAGS = -module -avoid-version > cairo_la_LIBADD = -llua5.1 -L/usr/lib -lcairo -L/usr/lib -ldirectfb > -L/usr/lib -lfreetype -L/usr/lib > cairo_la_SOURCES = src/lcairo.c > > resource.qt: > touch TESTING > > lcairo.o: resource.qt > > > > lcairo.o never gets triggered here. If I explicitly do make lcairo.o > then it will get triggered, but I'm not sure from scanning the > Makefile and Makefile.in how it would get implicitly triggered. >
Build once without your qt dependencies in place and carefully note the name and relative location of the object file generated from src/lcairo.c. The qt dependency rule will have to look like this: exact-name-and-relative-location-of-object : resource.qt This is the short answer. You might also want to use the $(OBJEXT) macro for the extension on the object file for portability's sake: .../lcairo.$(OBJEXT) : resource.qt This is why most people just use BUILT_SOURCES - it's cheating but it works for most cases. (See section 9.5 of the Automake manual for more info on BUILT_SOURCES). John