libtool
[Top][All Lists]
Advanced

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

Re: a libtool program


From: Ralf Wildenhues
Subject: Re: a libtool program
Date: Mon, 22 Sep 2008 22:47:52 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Qiang Zhong,

* Qiang Zhong wrote on Sun, Sep 21, 2008 at 11:14:41AM CEST:
>     I am a new user, In my project one source code main.c
> and the library directory sundials.
> ----main.c
> |
> ----sundials
>         |
>         |------include
>         |------src
> 
> the libsundials.la has been construct in src directory, my main.c file use
> the libsundials.la, when I use the hand write makefile,I can compile main.c,
> but when I use configure.in and makefile.am I could not ,Could somebody help
> me chek the file makefile.am where is wrong?

Well you did not post your Makefile.am, so it is difficult to see what
could have gone wrong.  It should look more or less like this if you use
only one Makefile.am:

  bin_PROGRAMS = main
  main_SOURCES = main.c
  main_LDADD = sundials/libsundials.la
  lib_LTLIBRARIES = sundials/libsundials.la
  sundials_libsundials_la_SOURCES = sundials/src/source1.c \
                                    ... \
                                    sundials/include/header1.h \
                                    ...

or like these if you use one per directory:

  --- Makefile.am ---
  SUBDIRS = sundials .
  bin_PROGRAMS = main
  main_SOURCES = main.c
  main_LDADD = sundials/libsundials.la

  --- sundials/Makefile.am ---
  lib_LTLIBRARIES = libsundials.la
  libsundials_la_SOURCES = src/source1.c \
                           ... \
                           include/header1.h \
                           ...

Hope that helps.

Cheers,
Ralf




reply via email to

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