make install

I use recursive makefiles and I have an header in a project’s directory
that I want to copy to /usr/local/include with a make install. This
project directory only contains this header.
I tried to include a Makefile with an ‘INSTALLDIR=/usr/local/include
line’ but make complain about ‘all’. Of course, there is nothing to do
in it.

I can’t figure out what to put in my Makefile.

Can you help me?

Thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

I use recursive makefiles and I have an header in a project’s directory
that I want to copy to /usr/local/include with a make install. This
project directory only contains this header.
I tried to include a Makefile with an ‘INSTALLDIR=/usr/local/include
line’ but make complain about ‘all’. Of course, there is nothing to do
in it.

‘make install’ resolves relative to the /TARGET_CPU/bin directory.
use:

INSTALLDIR = …/…/usr/local/bin

Unfortuneately that’s not a good solution if you’re building for
multiple CPU platforms. For this I use staging directories
relative to /TARGET_CPU/bin/test
lib/test

-Allan

I can’t figure out what to put in my Makefile.

Can you help me?

Thanks,
Alain.

Tools Mail Account a écrit :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
I use recursive makefiles and I have an header in a project’s directory
that I want to copy to /usr/local/include with a make install. This
project directory only contains this header.
I tried to include a Makefile with an ‘INSTALLDIR=/usr/local/include
line’ but make complain about ‘all’. Of course, there is nothing to do
in it.

‘make install’ resolves relative to the /TARGET_CPU/bin directory.
use:

INSTALLDIR = …/…/usr/local/bin

Unfortuneately that’s not a good solution if you’re building for
multiple CPU platforms. For this I use staging directories
relative to /TARGET_CPU/bin/test
lib/test

-Allan

I can’t figure out what to put in my Makefile.

Can you help me?

Thanks,
Alain.

This is not exactly what I wanted to know. To install the binary, it’s ok,
but when you create some API libraries, you also have to supply a header,
commonly stored in /usr/local/include to be able to write some program which
wants to use this API.
In that case, when I execute a make install for that package, I’d want to
install some binaries in /usr/local/bin, it’s easy to do with an INSTALLDIR
in the Makefile located in ./o, I’d want to install the library in
/usr/local/lib, easy with an INSTALLDIR in the makefile located in the ./so,
but about the .h files located in my ./include dir, that I’d want to copy in
/usr/local/include I don’t know how to do.

Thanks,
Alain.