Friday 15 August 2014

makefile - Packaging a library with Autotools -



makefile - Packaging a library with Autotools -

i'm starting out autotools, , i'm trying bundle library (a generic stack implementation learning purposes) along usage examples.

the library source lives in src , illustration in examples.

i have next makefile.am:

lib_ltlibraries = libstack.la libstack_la_sources = src/stack.c check_programs = example/stack example_stack_sources = example/stack.c example_stack_ldadd = libstack.la

as long understanding goes, need specify header libstack.la, , include example, next error when running autoreconf after adding libstack_la_headers = src/stack.h makefile.am:

$ autoreconf -iv ... (omiting irrelevant parts) makefile.am:3: error: 'libstack_la_headers' used 'libstack_ladir' undefined autoreconf: automake failed exit status: 1

i couldn't find info related dir prefix.

what missing here?

to handle header of library should write this:

libstackincludedir = $(includedir)/my_mega_stack libstackinclude_headers = stack.h

makefile autotools automake

No comments:

Post a Comment