Commit | Line | Data |
---|---|---|
0e65dfba NA |
1 | ## Process this file with automake to produce Makefile.in. |
2 | # | |
250d07de | 3 | # Copyright (C) 2019-2021 Free Software Foundation, Inc. |
0e65dfba NA |
4 | # |
5 | # This file is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with this program; see the file COPYING. If not see | |
17 | # <http://www.gnu.org/licenses/>. | |
18 | # | |
19 | ||
87279e3c | 20 | ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd |
0e65dfba | 21 | |
c59e30ed | 22 | AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex |
0e65dfba | 23 | |
a0486bac JM |
24 | # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is |
25 | # -I../zlib, unless we were configured with --with-system-zlib, in which | |
26 | # case both are empty. | |
27 | ZLIB = @zlibdir@ -lz | |
28 | ZLIBINC = @zlibinc@ | |
29 | ||
70d3120f NA |
30 | BASEDIR = $(srcdir)/.. |
31 | BFDDIR = $(BASEDIR)/bfd | |
87279e3c | 32 | INCDIR = $(srcdir)/../include |
987cf30a | 33 | AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../bfd -I../bfd @INCINTL@ |
a0486bac | 34 | AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ $(ZLIBINC) |
0e65dfba | 35 | |
87279e3c NA |
36 | if INSTALL_LIBBFD |
37 | lib_LTLIBRARIES = libctf.la libctf-nobfd.la | |
38 | include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h | |
39 | else | |
40 | include_HEADERS = | |
41 | noinst_LTLIBRARIES = libctf.la libctf-nobfd.la | |
42 | endif | |
0e65dfba | 43 | |
95148614 | 44 | libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB) |
87279e3c | 45 | libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@ |
8d2229ad | 46 | libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1 |
87279e3c | 47 | libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \ |
0f0c11f7 NA |
48 | ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \ |
49 | ctf-open.c ctf-sha1.c ctf-string.c ctf-subr.c ctf-types.c \ | |
50 | ctf-util.c | |
6b22174f | 51 | if NEED_CTF_QSORT_R |
87279e3c | 52 | libctf_nobfd_la_SOURCES += ctf-qsort_r.c |
6b22174f | 53 | endif |
87279e3c | 54 | |
1038406a | 55 | libctf_la_LIBADD = ../bfd/libbfd.la $(libctf_nobfd_la_LIBADD) |
8d2229ad | 56 | libctf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=0 |
87279e3c NA |
57 | libctf_la_LDFLAGS = $(libctf_nobfd_la_LDFLAGS) |
58 | libctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c | |
c59e30ed NA |
59 | |
60 | # Setup the testing framework, if you have one | |
61 | EXPECT = expect | |
62 | RUNTEST = runtest | |
63 | RUNTESTFLAGS = | |
64 | ||
cbd8f5bb | 65 | if TCL_TRY |
c59e30ed NA |
66 | CC_FOR_TARGET = ` \ |
67 | if [ -f $$r/../gcc/xgcc ] ; then \ | |
68 | if [ -f $$r/../newlib/Makefile ] ; then \ | |
69 | echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ | |
70 | else \ | |
71 | echo $$r/../gcc/xgcc -B$$r/../gcc/; \ | |
72 | fi; \ | |
73 | else \ | |
74 | if [ "@host@" = "@target@" ] ; then \ | |
75 | echo $(CC); \ | |
76 | else \ | |
77 | echo gcc | sed '$(transform)'; \ | |
78 | fi; \ | |
79 | fi` | |
80 | ||
70d3120f | 81 | check-DEJAGNU: site.exp development.exp |
c59e30ed NA |
82 | srcroot=`cd $(srcdir) && pwd`; export srcroot; \ |
83 | r=`pwd`; export r; \ | |
84 | LC_ALL=C; export LC_ALL; \ | |
85 | EXPECT=$(EXPECT); export EXPECT; \ | |
86 | runtest=$(RUNTEST); \ | |
87 | if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ | |
88 | $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ | |
89 | CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \ | |
95148614 | 90 | CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \ |
c59e30ed NA |
91 | else echo "WARNING: could not find \`runtest'" 1>&2; :;\ |
92 | fi | |
70d3120f NA |
93 | |
94 | development.exp: $(BFDDIR)/development.sh | |
95 | $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ | |
96 | | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ | |
97 | ||
98 | # development.sh is used to determine -Werror default. | |
99 | CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh | |
100 | ||
101 | EXTRA_DEJAGNU_SITE_CONFIG = development.exp | |
102 | ||
103 | DISTCLEANFILES = site.exp development.exp | |
cbd8f5bb | 104 | endif |