1

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.

adl
  • 15,627
  • 6
  • 51
  • 65
Filippo De Luca
  • 704
  • 5
  • 21
  • 1
    I'm not familiar with APXS, so I can't help. However the `INCLUDES` variable is deprecated and should be replaced by `AM_CPPFLAGS`. – adl Apr 28 '11 at 19:39

1 Answers1

1

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.

Jack Kelly
  • 18,264
  • 2
  • 56
  • 81