1 # Process this file with automake to generate Makefile.in
7 tooldir = $(exec_prefix)/$(target_alias)
9 ACLOCAL_AMFLAGS = -I ../bfd -I ../config
11 AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CXXFLAGS)
13 INCLUDES = -D_GNU_SOURCE \
14 -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \
15 -DLOCALEDIR="\"$(datadir)/locale\"" \
20 noinst_PROGRAMS = ld-new
21 noinst_LIBRARIES = libgold.a
78 EXTRA_DIST = yyscript.c yyscript.h
80 libgold_a_SOURCES = $(CCFILES) $(HFILES) $(YFILES)
82 ld_new_SOURCES = main.cc $(TARGETFILES)
83 ld_new_DEPENDENCIES = libgold.a $(LIBINTL_DEP)
84 ld_new_LDADD = libgold.a $(LIBINTL)
86 # Use an explicit dependency for the bison generated header file.
87 script.$(OBJEXT): yyscript.h
89 # We have to build libgold.a before we run the tests.
92 .PHONY: install-exec-local
94 install-exec-local: ld-new$(EXEEXT)
95 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
96 n=`echo ld | sed '$(transform)'; \
97 $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${n}$(EXEEXT); \
98 if test "$(bindir)" != "$(tooldir)/bin"; then \
99 rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
100 ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
101 || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
104 # We want install to imply install-info as per GNU standards, despite
106 install-data-local: install-info
108 POTFILES= $(CCFILES) $(HFILES) $(TARGETFILES)
110 po/POTFILES.in: @MAINT@ Makefile
111 for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
112 && mv tmp $(srcdir)/po/POTFILES.in