Initial CVS checkin of gold
[external/binutils.git] / gold / Makefile.am
1 # Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS =
4
5 SUBDIRS = po
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
18 noinst_PROGRAMS = ld-new
19
20 CFILES = \
21         dirsearch.cc \
22         fileread.cc \
23         gold.cc \
24         gold-threads.cc \
25         object.cc \
26         options.cc \
27         readsyms.cc \
28         workqueue.cc
29
30 HFILES = \
31         dirsearch.h \
32         fileread.h \
33         gold.h \
34         gold-threads.h \
35         object.h \
36         options.h \
37         readsyms.h \
38         symtab.h \
39         target.h \
40         targetsize.h \
41         workqueue.h
42
43 OFILES = gold.o options.o
44
45 POTFILES= $(CFILES) $(HFILES)
46
47 po/POTFILES.in: @MAINT@ Makefile
48         for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
49           && mv tmp $(srcdir)/po/POTFILES.in
50
51 ld_new_SOURCES = $(CFILES) $(HFILES)
52 ld_new_DEPENDENCIES = $(LIBINTL_DEP)
53 ld_new_LDADD = $(LIBINTL)
54
55 .PHONY: install-exec-local
56
57 install-exec-local: ld-new$(EXEEXT)
58         $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
59         n=`echo ld | sed '$(transform)'; \
60         $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${n}$(EXEEXT); \
61         if test "$(bindir)" != "$(tooldir)/bin"; then \
62           rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
63           ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
64             || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
65         fi
66
67 # We want install to imply install-info as per GNU standards, despite
68 # the cygnus option.
69 install-data-local: install-info