]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - libctf/Makefile.am
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / libctf / Makefile.am
CommitLineData
0e65dfba
NA
1## Process this file with automake to produce Makefile.in.
2#
fd67aa11 3# Copyright (C) 2019-2024 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 20ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
0e65dfba 21
1eaa86a6 22AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex
0e65dfba 23
862776f2
AA
24# Suppress 'configure.ac: error: AM_GNU_GETTEXT used but SUBDIRS not defined'
25# from Automake, as libctf uses AM_GNU_GETTEXT (through
26# ZW_GNU_GETTEXT_SISTER_DIR) but has no po/ subdir (currently).
27SUBDIRS =
28
1eaa86a6
MF
29# Variables that we might accumulate conditionally or in subdirs.
30info_TEXINFOS =
31DISTCLEANFILES =
32MAINTAINERCLEANFILES =
9be90c68 33
a0486bac
JM
34# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
35# -I../zlib, unless we were configured with --with-system-zlib, in which
36# case both are empty.
37ZLIB = @zlibdir@ -lz
38ZLIBINC = @zlibinc@
39
70d3120f
NA
40BASEDIR = $(srcdir)/..
41BFDDIR = $(BASEDIR)/bfd
87279e3c 42INCDIR = $(srcdir)/../include
987cf30a 43AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../bfd -I../bfd @INCINTL@
a0486bac 44AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ $(ZLIBINC)
0e65dfba 45
87279e3c
NA
46if INSTALL_LIBBFD
47lib_LTLIBRARIES = libctf.la libctf-nobfd.la
48include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h
49else
50include_HEADERS =
51noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
52endif
0e65dfba 53
95148614 54libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
ea9c2009
NA
55libctf_ldflags_nover = -version-info 0:0:0 @SHARED_LDFLAGS@
56libctf_nobfd_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS_NOBFD@
8d2229ad 57libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
87279e3c 58libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \
0f0c11f7 59 ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \
bf4c3185
NA
60 ctf-open.c ctf-serialize.c ctf-sha1.c ctf-string.c ctf-subr.c \
61 ctf-types.c ctf-util.c
6b22174f 62if NEED_CTF_QSORT_R
87279e3c 63libctf_nobfd_la_SOURCES += ctf-qsort_r.c
6b22174f 64endif
87279e3c 65
7d53105d
NA
66# @CTF_LIBADD@ appears here twice: once, to force libiberty to get searched before
67# install-time libbfd adds a -L to the install dir (possibly pointing at an
68# incompatible libiberty), and once via lictf_nobfd_la_LIBADD so that the
69# references in there get picked up.
70libctf_la_LIBADD = @CTF_LIBADD@ ../bfd/libbfd.la $(libctf_nobfd_la_LIBADD)
8d2229ad 71libctf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=0
ea9c2009 72libctf_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS@
87279e3c 73libctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c
c59e30ed
NA
74
75# Setup the testing framework, if you have one
76EXPECT = expect
77RUNTEST = runtest
78RUNTESTFLAGS =
79
80CC_FOR_TARGET = ` \
81 if [ -f $$r/../gcc/xgcc ] ; then \
82 if [ -f $$r/../newlib/Makefile ] ; then \
83 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
84 else \
85 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
86 fi; \
87 else \
88 if [ "@host@" = "@target@" ] ; then \
89 echo $(CC); \
90 else \
91 echo gcc | sed '$(transform)'; \
92 fi; \
93 fi`
94
70d3120f 95check-DEJAGNU: site.exp development.exp
c59e30ed
NA
96 srcroot=`cd $(srcdir) && pwd`; export srcroot; \
97 r=`pwd`; export r; \
98 LC_ALL=C; export LC_ALL; \
99 EXPECT=$(EXPECT); export EXPECT; \
30a794e9
NA
100 if [ "@host@" = "@target@" ] ; then \
101 TEST_CROSS=no; \
102 else \
103 TEST_CROSS=yes; \
104 fi; \
c59e30ed
NA
105 runtest=$(RUNTEST); \
106 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
107 $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
30a794e9 108 CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" TEST_CROSS="$${TEST_CROSS}" \
ad77db1c
AM
109 CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
110 LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
c59e30ed
NA
111 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
112 fi
70d3120f
NA
113
114development.exp: $(BFDDIR)/development.sh
c7d1b270 115 $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
70d3120f 116 | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
e2dc08c6 117 echo "set have_tcl_try @HAVE_TCL_TRY@" >> $@
70d3120f
NA
118
119# development.sh is used to determine -Werror default.
120CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
121
122EXTRA_DEJAGNU_SITE_CONFIG = development.exp
123
1eaa86a6 124DISTCLEANFILES += site.exp development.exp
1eaa86a6 125
1eaa86a6 126include doc/local.mk