OSDN Git Service

2010-12-05 Kai Tietz <kai.tietz@onevision.com>
[pf3gnuchains/gcc-fork.git] / lto-plugin / Makefile.am
index da74e1c..fb1d6c2 100644 (file)
@@ -7,17 +7,16 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
 target_noncanonical := @target_noncanonical@
 libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
 
-# How to find libelf
-LIBELFLIBS = @LIBELFLIBS@
-LIBELFINC = @LIBELFINC@
-
-AM_CPPFLAGS = -I$(top_srcdir)/../include $(LIBELFINC)
+AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
 AM_CFLAGS = -Wall -Werror
 
 libexecsub_LTLIBRARIES = liblto_plugin.la
 
 liblto_plugin_la_SOURCES = lto-plugin.c
-liblto_plugin_la_LIBADD = $(LIBELFLIBS) ../libiberty/pic/libiberty.a
+liblto_plugin_la_LIBADD = \
+       $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+liblto_plugin_la_LDFLAGS = -no-undefined -bindir $(libexecsubdir) \
+       $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
 
 all: copy_lto_plugin