[Top][All Lists]

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

Re: How to revise

From: Ralf Wildenhues
Subject: Re: How to revise
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, the class is written in Java and
> compiled with gcj. 

If the project does not use java yet, you need to adapt as well as the  Best start reading
  info '( Support'
after you're done with the initial examples and the general 'Building'

> The project contains hundreds C/C++ programs, which
> are compiled by using and
> (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/, and have included "permis.h" at
> the beginning. I am not sure how to insert the path of
> "" into, 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 = ...

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).


reply via email to

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