Commit | Line | Data |
---|---|---|
bae7f79e ILT |
1 | # Process this file with automake to generate Makefile.in |
2 | ||
3 | AUTOMAKE_OPTIONS = | |
4 | ||
5a6f7e2d | 5 | SUBDIRS = po testsuite |
bae7f79e ILT |
6 | |
7 | tooldir = $(exec_prefix)/$(target_alias) | |
8 | ||
9 | ACLOCAL_AMFLAGS = -I ../bfd -I ../config | |
10 | ||
11 | AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CXXFLAGS) | |
12 | ||
13 | INCLUDES = -D_GNU_SOURCE \ | |
14 | -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \ | |
15 | -DLOCALEDIR="\"$(datadir)/locale\"" \ | |
16 | @INCINTL@ | |
17 | ||
dbe717ef ILT |
18 | YFLAGS = -d |
19 | ||
bae7f79e | 20 | noinst_PROGRAMS = ld-new |
5a6f7e2d | 21 | noinst_LIBRARIES = libgold.a |
bae7f79e | 22 | |
14bfc3f5 | 23 | CCFILES = \ |
61ba1cf9 | 24 | archive.cc \ |
ead1e424 ILT |
25 | common.cc \ |
26 | defstd.cc \ | |
bae7f79e | 27 | dirsearch.cc \ |
dbe717ef | 28 | dynobj.cc \ |
bae7f79e ILT |
29 | fileread.cc \ |
30 | gold.cc \ | |
31 | gold-threads.cc \ | |
a2fb1b05 | 32 | layout.cc \ |
b8e6aad9 | 33 | merge.cc \ |
bae7f79e ILT |
34 | object.cc \ |
35 | options.cc \ | |
a2fb1b05 | 36 | output.cc \ |
7e1edb90 | 37 | parameters.cc \ |
bae7f79e | 38 | readsyms.cc \ |
61ba1cf9 | 39 | reloc.cc \ |
14bfc3f5 | 40 | resolve.cc \ |
dbe717ef | 41 | script.cc \ |
14bfc3f5 ILT |
42 | symtab.cc \ |
43 | stringpool.cc \ | |
44 | target-select.cc \ | |
bae7f79e ILT |
45 | workqueue.cc |
46 | ||
47 | HFILES = \ | |
61ba1cf9 | 48 | archive.h \ |
ead1e424 ILT |
49 | common.h \ |
50 | defstd.h \ | |
bae7f79e | 51 | dirsearch.h \ |
dbe717ef | 52 | dynobj.h \ |
bae7f79e ILT |
53 | fileread.h \ |
54 | gold.h \ | |
55 | gold-threads.h \ | |
a2fb1b05 | 56 | layout.h \ |
b8e6aad9 | 57 | merge.h \ |
bae7f79e ILT |
58 | object.h \ |
59 | options.h \ | |
a2fb1b05 | 60 | output.h \ |
7e1edb90 | 61 | parameters.h \ |
bae7f79e | 62 | readsyms.h \ |
61ba1cf9 | 63 | reloc.h \ |
c06b7b0b | 64 | reloc-types.h \ |
dbe717ef | 65 | script.h \ |
c06b7b0b | 66 | script-c.h \ |
14bfc3f5 | 67 | stringpool.h \ |
bae7f79e ILT |
68 | symtab.h \ |
69 | target.h \ | |
61ba1cf9 | 70 | target-reloc.h \ |
14bfc3f5 | 71 | target-select.h \ |
bae7f79e ILT |
72 | workqueue.h |
73 | ||
14bfc3f5 ILT |
74 | TARGETFILES = \ |
75 | i386.cc | |
76 | ||
dbe717ef ILT |
77 | YFILES = \ |
78 | yyscript.y | |
79 | ||
80 | EXTRA_DIST = yyscript.c yyscript.h | |
bae7f79e | 81 | |
5a6f7e2d | 82 | libgold_a_SOURCES = $(CCFILES) $(HFILES) $(YFILES) |
bae7f79e | 83 | |
5a6f7e2d ILT |
84 | ld_new_SOURCES = main.cc $(TARGETFILES) |
85 | ld_new_DEPENDENCIES = libgold.a $(LIBINTL_DEP) | |
86 | ld_new_LDADD = libgold.a $(LIBINTL) | |
bae7f79e | 87 | |
dbe717ef ILT |
88 | # Use an explicit dependency for the bison generated header file. |
89 | script.$(OBJEXT): yyscript.h | |
90 | ||
5a6f7e2d ILT |
91 | # We have to build libgold.a before we run the tests. |
92 | check: libgold.a | |
93 | ||
bae7f79e ILT |
94 | .PHONY: install-exec-local |
95 | ||
96 | install-exec-local: ld-new$(EXEEXT) | |
97 | $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin | |
98 | n=`echo ld | sed '$(transform)'; \ | |
99 | $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${n}$(EXEEXT); \ | |
100 | if test "$(bindir)" != "$(tooldir)/bin"; then \ | |
101 | rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ | |
102 | ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ | |
103 | || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ | |
104 | fi | |
105 | ||
106 | # We want install to imply install-info as per GNU standards, despite | |
107 | # the cygnus option. | |
108 | install-data-local: install-info | |
5a6f7e2d ILT |
109 | |
110 | POTFILES= $(CCFILES) $(HFILES) $(TARGETFILES) | |
111 | ||
112 | po/POTFILES.in: @MAINT@ Makefile | |
113 | for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \ | |
114 | && mv tmp $(srcdir)/po/POTFILES.in |