AUTOMAKE_OPTIONS =
-SUBDIRS = po
+SUBDIRS = po testsuite
tooldir = $(exec_prefix)/$(target_alias)
-DLOCALEDIR="\"$(datadir)/locale\"" \
@INCINTL@
+YFLAGS = -d
+
noinst_PROGRAMS = ld-new
+noinst_LIBRARIES = libgold.a
CCFILES = \
archive.cc \
common.cc \
defstd.cc \
dirsearch.cc \
+ dynobj.cc \
fileread.cc \
gold.cc \
gold-threads.cc \
readsyms.cc \
reloc.cc \
resolve.cc \
+ script.cc \
symtab.cc \
stringpool.cc \
target-select.cc \
common.h \
defstd.h \
dirsearch.h \
+ dynobj.h \
fileread.h \
gold.h \
gold-threads.h \
output.h \
readsyms.h \
reloc.h \
+ reloc-types.h \
+ script.h \
+ script-c.h \
stringpool.h \
symtab.h \
target.h \
TARGETFILES = \
i386.cc
-OFILES = gold.o options.o
+YFILES = \
+ yyscript.y
-POTFILES= $(CCFILES) $(HFILES) $(TARGETFILES)
+EXTRA_DIST = yyscript.c yyscript.h
-po/POTFILES.in: @MAINT@ Makefile
- for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
- && mv tmp $(srcdir)/po/POTFILES.in
+libgold_a_SOURCES = $(CCFILES) $(HFILES) $(YFILES)
+
+ld_new_SOURCES = main.cc $(TARGETFILES)
+ld_new_DEPENDENCIES = libgold.a $(LIBINTL_DEP)
+ld_new_LDADD = libgold.a $(LIBINTL)
+
+# Use an explicit dependency for the bison generated header file.
+script.$(OBJEXT): yyscript.h
-ld_new_SOURCES = $(CCFILES) $(HFILES) $(TARGETFILES)
-ld_new_DEPENDENCIES = $(LIBINTL_DEP)
-ld_new_LDADD = $(LIBINTL)
+# We have to build libgold.a before we run the tests.
+check: libgold.a
.PHONY: install-exec-local
# We want install to imply install-info as per GNU standards, despite
# the cygnus option.
install-data-local: install-info
+
+POTFILES= $(CCFILES) $(HFILES) $(TARGETFILES)
+
+po/POTFILES.in: @MAINT@ Makefile
+ for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in