1 # Process this file with automake to generate Makefile.in
3 # As far as I can tell automake testing support assumes that the build
4 # system and the host system are the same. So these tests will not
5 # work when building with a cross-compiler.
9 AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CXXFLAGS)
11 INCLUDES = -D_GNU_SOURCE \
12 -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../include \
13 -I$(srcdir)/../../elfcpp \
14 -DLOCALEDIR="\"$(datadir)/locale\"" \
19 NATIVE_TESTING = t1 t1_pic
23 TESTS = object_unittest $(NATIVE_TESTING)
25 check_LIBRARIES = libgoldtest.a
26 libgoldtest_a_SOURCES = test.cc testmain.cc testfile.cc
28 LDADD = libgoldtest.a ../libgold.a
30 check_PROGRAMS = object_unittest
32 object_unittest_SOURCES = object_unittest.cc
37 gcctestdir/ld: ../ld-new
38 test -d gcctestdir || mkdir -p gcctestdir
40 (cd gcctestdir && $(LN_S) ../../ld-new ld)
42 # Override the default CXXFLAGS--we don't want any optimization
44 $(CXXCOMPILE) -O0 -c -o $@ $<
45 t1: t1.o gcctestdir/ld
46 $(CXXLINK) -Bgcctestdir/ t1.o
49 $(CXXCOMPILE) -O0 -c -fpic -o $@ $<
50 t1_pic: t1_pic.o gcctestdir/ld
51 $(CXXLINK) -Bgcctestdir/ t1_pic.o