Question

I'm developing a apache module and a shared library in the same Autoconf/Automake project. How my Makefile.am should be?

Now it is:

INCLUDES = -I$(top_srcdir)

nobase_include_HEADERS =  \
  foo.h \
  bar.h 

lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = \
  foo.c \
  bar.c 

libfoo_la_LDFLAGS = -version-info 0:0:0

I can add these lines:

lib_LTLIBRARIES = mod_foo.la
mod_foo_la_SOURCES = mod_foo.c
mod_foo_la_LDFLAGS = -module
mod_foo_la_LIBADD = libfoo.la

Is it right?

how to make install the module with APXS and the shared library with libtool? If i put:

install:
    $(APXS) -i -a -n foo mod_foo.la

I think the libfoo.la it is not installed but only the module.

Was it helpful?

Solution

Nothing's being installed because you're overriding the install target. Try using install-exec-local (manual):

install-exec-local:
    $(APXS) -i -a -n foo mod_foo.la

(Note that I don't know APXS, I'm just copying your rule.)

You should also define an uninstall-local target to clean up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top