Using autotools and libtool, I need to merge several libraries in subdirectories into a bigger static library in toplevel directory. Here is schema:
# src/Makefile.am
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS = foo bar .
noinst_LTLIBRARIES = libbig.la
libbig_la_LIBADD = \
foo/libfoo.la \
foo/libbar.la
In sub-directories:
# src/foo/Makefile.am
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
noinst_LTLIBRARIES = libfoo.la
libbig_la_SOURCES = \
foo.cpp \
foo_ji.cpp
It says no rule to make target libbig.la
. Is it possible to make a library (static or shared) using no source files?
It needs to read libfoo_la_SOURCES
and libbig_la_SOURCES
and libbig_la_LIBADD