[Top][All Lists]

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

Re: program specific LDFLAGS

From: Bob Rossi
Subject: Re: program specific LDFLAGS
Date: Sat, 27 Jan 2007 08:38:23 -0500
User-agent: Mutt/1.5.12-2006-07-14

On Fri, Jan 26, 2007 at 11:04:36PM -0800, David Byron wrote:
> I'm trying to conditionally add a program-specific linker flag but I'm
> having trouble.
> Part of my looks like this:
> noinst_PROGRAMS = zombie immOutTester testrunner
> # Use these flags for all the programs built here
> LDADD = $(top_builddir)/util/util.a $(BOOST_LIBS) ${PTHREAD_LIBS}
> # testrunner needs testmain and some other things
> testrunner_LDADD = $(top_builddir)/testmain/libtestmain.a $(BOOST_LIBS)

Well, I could be wrong about this, since I'm not an expert. But I do,
  testrunner_LDADD = -ltestmain $(BOOST_LIBS)
  testrunner_LDFLAGS = -L$(top_builddir)/testmain
don't know if that makes a big difference.

>     testrunner_LDADD += $(top_builddir)/minidumper/libminidumper.a
>     testrunner_LDFLAGS = /ENTRY:testrunnerCRTStartup
>     LIBS += version.lib
> endif

Again, I would consider doing this very different. In autoconf, figure
out if you are on windows with the AC_CANONICAL_TARGET, ..

Then, in autoconf do an AC_SUBST of the LDFLAGS you are intested in for
this platform. Then in you you can have


Please take my advice with a grain of salt, not sure what your
experience level is.

Bob Rossi

reply via email to

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