automake
[Top][All Lists]
Advanced

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

specific LTLIBRARIES targets ?


From: Yannick PERRET
Subject: specific LTLIBRARIES targets ?
Date: Thu, 07 Feb 2002 10:39:16 +0100

Hi.

I'm writing a configure for a project.
In this project, I have a src/ dir. with
- a script to install
- a prog to compile (and install)
- a shared library to create (and install)

For the script and the program, no problems.
For the library, I first create a static version,
using _LIBRARIES, and it was fine.

Then I use _LTLIBRARIES and then
the link stage crash during 'make all'.
The problem is that my library gives '_init'
and '_fini' symbols, and 'libtools' try to link
with 'gcc', which gives them too.

My Makefile to perform link stage uses 'ld'
instead of 'gcc', which prevent that kind of
trouble.
An other way is to tell to 'gcc' to not insert
startfiles (-nostartfiles) but it is not a nice way
(because other symbols comes from startfiles).


My question is:
how to explain in the Makefile.am that the link
stage MUST use ld ?

Here is my current Makefile.am:

bin_PROGRAMS = fc_manager

fc_manager_SOURCES = \
        fc_manager.c fc_tools.c fc_time.c fc_com_manager.c \
        fc_context.c fc_graph.c fc_stack.c fc_functions.c \
        fc_hash.c \
                     fc_tools.h fc_time.h fc_com_manager.h \
        fc_context.h fc_graph.h fc_stack.h fc_functions.h \
        fc_hash.h \
        fc_global.h

lib_LTLIBRARIES = libfc.la

libfc_la_SOURCES = \
        fc_check.c fc_tools.c fc_time.c fc_ressources.c fc_com.c \
                   fc_tools.h fc_time.h fc_ressources.h fc_com.h


-> I add this part to perform that...

CCLDFC = "$(CC) -nostartfiles"
LINKFC = $(LIBTOOL) --mode=link $(CCLDFC) $(AM_CFLAGS) $(CFLAGS)
$(LDFLAGS) -o $
@

libfc.la: $(libfc_la_OBJECTS) $(libfc_la_DEPENDENCIES)
        $(LINKFC) -rpath $(libdir) $(libfc_la_LDFLAGS)
$(libfc_la_OBJECTS) $(lib
fc_la_LIBADD) $(LIBS)



CFLAGS = -Wall -O3

bin_SCRIPTS = fc-config

EXTRA_DIST = fc-config




Thank you for any help.

Regards.
--
Yannick





reply via email to

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