2010-10-14 Jeremie Salvucci <jeremie.salvucci@free.fr>
[official-gcc.git] / lto-plugin / Makefile.am
blob52bf6719daa6a39e146517704886ea05973c36cf
1 # Makefile.am is used by automake 1.11 to generate Makefile.in.
3 ACLOCAL_AMFLAGS = -I .. -I ../config
4 AUTOMAKE_OPTIONS = no-dependencies
6 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
7 target_noncanonical := @target_noncanonical@
8 libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
10 # How to find libelf
11 LIBELFLIBS = @LIBELFLIBS@
12 LIBELFINC = @LIBELFINC@
14 # Which object format to parse.
15 LTO_FORMAT = @LTO_FORMAT@
17 AM_CPPFLAGS = -I$(top_srcdir)/../include $(LIBELFINC)
18 AM_CFLAGS = -Wall -Werror
20 libexecsub_LTLIBRARIES = liblto_plugin.la
22 liblto_plugin_la_SOURCES = lto-plugin.c lto-plugin-$(LTO_FORMAT).c
23 liblto_plugin_la_LIBADD = $(LIBELFLIBS) \
24         $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
25 liblto_plugin_la_LDFLAGS = -no-undefined -bindir $(libexecsubdir) \
26         $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
28 all: copy_lto_plugin
30 copy_lto_plugin: all-am
31         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $(libexecsub_LTLIBRARIES) `pwd`/../gcc/