This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Partially Linked Objects


On 10 May 1999, Olly Betts wrote:

> Hi,
> 
> I'm trying to use automake to build a partially linked object (ld -r on all
> the Unix platforms I need to support).  I've tried a few variations along
> the lines of:
> 
> noinst_DATA = partial.o
> 
> partial_o_SOURCES = partial1.c partial2.c
> 
> partial.o: $(partial_o_SOURCES)
>         ld -o $@ -r $(partial_o_OBJECTS)
> 
> But not had any success.
> 
> Is there a way of doing this?  In reality there are a couple of hundred
> sources, so I'm trying to avoid having to maintain a list of the sources and
> the objects separately.  Any suggestions greatly appreciated.
>
Two suggestions.  Use libtool convienence libraries, or do something like
this:

noinst_PROGRAMS = partial.o
partial_o_LDFLAGS = $(LDFLAGS) -r
partial_o_SOURCES = partial1.c partial2.c

--
Brian Ford
Software Engineer
Vital Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]