Automake: how to use the header from one library to another library in the sister directory

My directory is installed:

libone one.c one.h Makefile.am libtwo two.c #includes one.h two.h Makefile.am ... Makefile.am configure.ac ... 

Now when I do autoreconf -fvi and configure and create, I get an error from two.c: could not find one.h. How to configure inclusion paths in Makefile.am? Any help was appreciated.

0
source share
1 answer

Or do it fast in a dirty way

 #include "../libone/one.h" 

or (preferably, because then it doesn’t matter if one.h is one.h either in the source tree or decomposed into another project)

 #include <libone/one.h> 

and in Makefile.am

 libtwo_a_SOURCES = two.c two.h libtwo_a_CPPFLAGS = -I$(top_srcdir) 
0
source

All Articles