This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to create static library with sources from multiple dirs?


On Sunday 16 February 2003 01:46, Bob Rossi wrote:
[...]
> Is there any way to solve my problem? Help would be greatly appreciated.

Hello Bob,
I would do it in this way, but I'm not an Autotools expert and it requires 
Libtool:

top_src_dir
	configure.ac
		[...]
		AC_PROG_LIBTOOL
		AC_DISABLE_SHARED
		[...]
	include
		Makefile.am
			noinst_HEADERS = header0.h header1.h
	src0
		Makefile.am
			# Empty
	src1
		Makefile.am
			# Empty
	lib
		Makefile.am
			AM_CPPFLAGS = -I$(top_srcdir)/include 

			lib_LTLIBRARIES = libMyLib.la

			# Bug or feature workaround
			my_top_srcdir = $(top_srcdir)

			libMyLib_la_SOURCES = $(my_top_srcdir)/src0/src0.cpp \ 			
				$(my_top_srcdir)/src1/src1.cpp
			libMyLib_la_LDFLAGS = -avoid-version

Ciao



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]