I'm trying to conditionally add a program-specific linker flag but I'm having trouble.
Part of my Makefile.am 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) $(CPPUNIT_LIBS) $(GETOPT_LIBS) $(LDADD) if PLATFORM_WINDOWS testrunner_LDADD += $(top_builddir)/minidumper/libminidumper.a testrunner_LDFLAGS = /ENTRY:testrunnerCRTStartup LIBS += version.lib endif Unfortunately, it doesn't look like testrunner_LDFLAGS appears anywhere in the generated Makefile except where I assign to it above. Instead I tried this: if PLATFORM_WINDOWS testrunner_LDADD += $(top_builddir)/minidumper/libminidumper.a /ENTRY:testrunnerCRTStartup LIBS += version.lib endif This causes me a different problem...I get an error from make (both gnu 3.80 and 3.81) like this: Makefile:427: *** multiple target patterns. Stop. I also tried this: if PLATFORM_WINDOWS testrunner_LDADD += $(top_builddir)/minidumper/libminidumper.a "/ENTRY:testrunnerCRTStartup" LIBS += version.lib endif but that gives the same result. Something else I don't understand is that using AM_LDADD above instead of plain LDADD works fine for testrunner, but not for the other programs. Isn't AM_LDADD considered more correct? Thanks for your help. I'm using automake 1.10 with the .deps patch and autoconf 2.61. -DB