opcodes/
[binutils.git] / gold / Makefile.am
blobf76ee5b00c5852c6fda7ac0181a8bdc65c569e44
1 # Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS =
5 SUBDIRS = po
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\"" \
16         @INCINTL@
18 YFLAGS = -d
20 noinst_PROGRAMS = ld-new
22 CCFILES = \
23         archive.cc \
24         common.cc \
25         defstd.cc \
26         dirsearch.cc \
27         dynobj.cc \
28         fileread.cc \
29         gold.cc \
30         gold-threads.cc \
31         layout.cc \
32         object.cc \
33         options.cc \
34         output.cc \
35         readsyms.cc \
36         reloc.cc \
37         resolve.cc \
38         script.cc \
39         symtab.cc \
40         stringpool.cc \
41         target-select.cc \
42         workqueue.cc
44 HFILES = \
45         archive.h \
46         common.h \
47         defstd.h \
48         dirsearch.h \
49         dynobj.h \
50         fileread.h \
51         gold.h \
52         gold-threads.h \
53         layout.h \
54         object.h \
55         options.h \
56         output.h \
57         readsyms.h \
58         reloc.h \
59         reloc-types.h \
60         script.h \
61         script-c.h \
62         stringpool.h \
63         symtab.h \
64         target.h \
65         target-reloc.h \
66         target-select.h \
67         workqueue.h
69 TARGETFILES = \
70         i386.cc
72 YFILES = \
73         yyscript.y
75 EXTRA_DIST = yyscript.c yyscript.h
77 POTFILES= $(CCFILES) $(HFILES) $(TARGETFILES)
79 po/POTFILES.in: @MAINT@ Makefile
80         for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
81           && mv tmp $(srcdir)/po/POTFILES.in
83 ld_new_SOURCES = $(CCFILES) $(HFILES) $(TARGETFILES) $(YFILES)
84 ld_new_DEPENDENCIES = $(LIBINTL_DEP)
85 ld_new_LDADD = $(LIBINTL)
87 # Use an explicit dependency for the bison generated header file.
88 script.$(OBJEXT): yyscript.h
90 .PHONY: install-exec-local
92 install-exec-local: ld-new$(EXEEXT)
93         $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
94         n=`echo ld | sed '$(transform)'; \
95         $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${n}$(EXEEXT); \
96         if test "$(bindir)" != "$(tooldir)/bin"; then \
97           rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
98           ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
99             || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
100         fi
102 # We want install to imply install-info as per GNU standards, despite
103 # the cygnus option.
104 install-data-local: install-info