automake
[Top][All Lists]
Advanced

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

Re: How to revise automake.am


From: Ralf Wildenhues
Subject: Re: How to revise automake.am
Date: Fri, 10 Sep 2004 15:12:44 +0200
User-agent: Mutt/1.4.1i

* Zhi Qing Wu wrote on Fri, Sep 10, 2004 at 02:48:38PM CEST:
> 
> I am not very familiar with automake. 

Its documentation has grown to be quite readable and understandable.

> I need to insert a class into an existing project
> (programed by someone else). I only have the the
> header file and compiled library of the class (say,
> permis.h, permis.so). the class is written in Java and
> compiled with gcj. 

If the project does not use java yet, you need to adapt
configure.ac as well as the Makefile.am.  Best start reading
around
  info '(automake.info)Java Support'
after you're done with the initial examples and the general 'Building'
part.

> The project contains hundreds C/C++ programs, which
> are compiled by using Makefile.am and configure.ac
> (both have been provided by the project).
>  
> I did some revisions to one of the C/C++ programs. The
> revised class will use some methods in
> permis.h/permis.so, and have included "permis.h" at
> the beginning. I am not sure how to insert the path of
> "permis.so" into Makefile.am, configure.ac or some
> configure files else in order to make the revised
> class properly compiled?

If the program is called `foo', and the project already uses Automake
stuff like

foo_SOURCES = foo1.cc bla.cc ...

then you could just add

foo_CPPFLAGS = -I$(srcdir)/rel/path

where rel/path is the relative path to the directory where permis.h is
located (and the srcdir part is there to allow building outside the
source directory).  Similarly, foo_LDADD can be used for adding
libraries.  Using *shared* libraries is not at all that simple, however,
especially doing it portably and worrying about installed/uninstalled
libraries and versions.  There are lots of infos on that topic in the
Automake as well as in the Libtool manual (you did not mention whether
the project uses Libtool or not).

Regards,
Ralf




reply via email to

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