Hello, I'm new to the Autotools, and I'm having some trouble to link two libraries between them. I'll summarize what I need to do and what I'm doing.
I have implemented libA and libB. The libA files are stored in dirA and libB files in dirB, so they are compiled separately (with different sub-Makefiles): first I compile libA (successfully) and then libB. But I need to link libB with libA when compiling libA, and there is where I'm having problems. Specifically, when doing make, I get this error (I've translated it approximately, as I get it in a language other than english): make[4]: *** No rule to make target `libA.la', needed by `libB.la'. Stop. * Makefile for libA (simplified): lib_LTLIBRARIES = libA.la libA_la_SOURCES = srcA.c srcA.h libA_la_LDFLAGS = @LIBA_FLAGS@ * Makefile for libB (simplified): INCLUDES = -I$(top_srcdir)/dirA lib_LTLIBRARIES = libB.la libB_la_SOURCES = srcB.c srcB.h libB_la_LDFLAGS = @LIBB_FLAGS@ libB_la_LIBADD = libA.la I've tried also with "libB_la_LDADD = libA.la" and other several options that I don't recall now, but I haven't get to the right solution. Could someone help me? Thank you.