automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Sebastian Huber
Subject: Re: How to create static library with sources from multiple dirs?
Date: Sun, 16 Feb 2003 14:25:20 +0100
User-agent: KMail/1.4.3

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]