18dffb485Schristos## Process this file with automake to produce Makefile.in. 28dffb485Schristos# 3*12989c96Schristos# Copyright (C) 2019-2024 Free Software Foundation, Inc. 48dffb485Schristos# 58dffb485Schristos# This file is free software; you can redistribute it and/or modify 68dffb485Schristos# it under the terms of the GNU General Public License as published by 78dffb485Schristos# the Free Software Foundation; either version 2 of the License, or 88dffb485Schristos# (at your option) any later version. 98dffb485Schristos# 108dffb485Schristos# This program is distributed in the hope that it will be useful, 118dffb485Schristos# but WITHOUT ANY WARRANTY; without even the implied warranty of 128dffb485Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 138dffb485Schristos# GNU General Public License for more details. 148dffb485Schristos# 158dffb485Schristos# You should have received a copy of the GNU General Public License 168dffb485Schristos# along with this program; see the file COPYING. If not see 178dffb485Schristos# <http://www.gnu.org/licenses/>. 188dffb485Schristos# 198dffb485Schristos 208dffb485SchristosACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd 218dffb485Schristos 224b169a6bSchristosAUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex 234b169a6bSchristos 24*12989c96Schristos# Suppress 'configure.ac: error: AM_GNU_GETTEXT used but SUBDIRS not defined' 25*12989c96Schristos# from Automake, as libctf uses AM_GNU_GETTEXT (through 26*12989c96Schristos# ZW_GNU_GETTEXT_SISTER_DIR) but has no po/ subdir (currently). 27*12989c96SchristosSUBDIRS = 28*12989c96Schristos 294b169a6bSchristos# Variables that we might accumulate conditionally or in subdirs. 304b169a6bSchristosinfo_TEXINFOS = 314b169a6bSchristosDISTCLEANFILES = 324b169a6bSchristosMAINTAINERCLEANFILES = 338dffb485Schristos 348dffb485Schristos# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is 358dffb485Schristos# -I../zlib, unless we were configured with --with-system-zlib, in which 368dffb485Schristos# case both are empty. 378dffb485SchristosZLIB = @zlibdir@ -lz 388dffb485SchristosZLIBINC = @zlibinc@ 398dffb485Schristos 404b169a6bSchristosBASEDIR = $(srcdir)/.. 414b169a6bSchristosBFDDIR = $(BASEDIR)/bfd 428dffb485SchristosINCDIR = $(srcdir)/../include 438dffb485SchristosAM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../bfd -I../bfd @INCINTL@ 448dffb485SchristosAM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ $(ZLIBINC) 458dffb485Schristos 468dffb485Schristosif INSTALL_LIBBFD 478dffb485Schristoslib_LTLIBRARIES = libctf.la libctf-nobfd.la 488dffb485Schristosinclude_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h 498dffb485Schristoselse 508dffb485Schristosinclude_HEADERS = 518dffb485Schristosnoinst_LTLIBRARIES = libctf.la libctf-nobfd.la 528dffb485Schristosendif 538dffb485Schristos 544b169a6bSchristoslibctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB) 554b169a6bSchristoslibctf_ldflags_nover = -version-info 0:0:0 @SHARED_LDFLAGS@ 564b169a6bSchristoslibctf_nobfd_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS_NOBFD@ 578dffb485Schristoslibctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1 588dffb485Schristoslibctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \ 598dffb485Schristos ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \ 604b169a6bSchristos ctf-open.c ctf-serialize.c ctf-sha1.c ctf-string.c ctf-subr.c \ 614b169a6bSchristos ctf-types.c ctf-util.c 628dffb485Schristosif NEED_CTF_QSORT_R 638dffb485Schristoslibctf_nobfd_la_SOURCES += ctf-qsort_r.c 648dffb485Schristosendif 658dffb485Schristos 664b169a6bSchristos# @CTF_LIBADD@ appears here twice: once, to force libiberty to get searched before 674b169a6bSchristos# install-time libbfd adds a -L to the install dir (possibly pointing at an 684b169a6bSchristos# incompatible libiberty), and once via lictf_nobfd_la_LIBADD so that the 694b169a6bSchristos# references in there get picked up. 704b169a6bSchristoslibctf_la_LIBADD = @CTF_LIBADD@ ../bfd/libbfd.la $(libctf_nobfd_la_LIBADD) 718dffb485Schristoslibctf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=0 724b169a6bSchristoslibctf_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS@ 738dffb485Schristoslibctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c 748dffb485Schristos 754b169a6bSchristos# Setup the testing framework, if you have one 764b169a6bSchristosEXPECT = expect 774b169a6bSchristosRUNTEST = runtest 784b169a6bSchristosRUNTESTFLAGS = 798dffb485Schristos 804b169a6bSchristosCC_FOR_TARGET = ` \ 814b169a6bSchristos if [ -f $$r/../gcc/xgcc ] ; then \ 824b169a6bSchristos if [ -f $$r/../newlib/Makefile ] ; then \ 834b169a6bSchristos echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ 844b169a6bSchristos else \ 854b169a6bSchristos echo $$r/../gcc/xgcc -B$$r/../gcc/; \ 864b169a6bSchristos fi; \ 874b169a6bSchristos else \ 884b169a6bSchristos if [ "@host@" = "@target@" ] ; then \ 894b169a6bSchristos echo $(CC); \ 904b169a6bSchristos else \ 914b169a6bSchristos echo gcc | sed '$(transform)'; \ 924b169a6bSchristos fi; \ 934b169a6bSchristos fi` 944b169a6bSchristos 954b169a6bSchristoscheck-DEJAGNU: site.exp development.exp 964b169a6bSchristos srcroot=`cd $(srcdir) && pwd`; export srcroot; \ 974b169a6bSchristos r=`pwd`; export r; \ 984b169a6bSchristos LC_ALL=C; export LC_ALL; \ 994b169a6bSchristos EXPECT=$(EXPECT); export EXPECT; \ 100*12989c96Schristos if [ "@host@" = "@target@" ] ; then \ 101*12989c96Schristos TEST_CROSS=no; \ 102*12989c96Schristos else \ 103*12989c96Schristos TEST_CROSS=yes; \ 104*12989c96Schristos fi; \ 1054b169a6bSchristos runtest=$(RUNTEST); \ 1064b169a6bSchristos if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ 1074b169a6bSchristos $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ 108*12989c96Schristos CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" TEST_CROSS="$${TEST_CROSS}" \ 1094b169a6bSchristos CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \ 1104b169a6bSchristos LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \ 1114b169a6bSchristos else echo "WARNING: could not find \`runtest'" 1>&2; :;\ 1124b169a6bSchristos fi 1134b169a6bSchristos 1144b169a6bSchristosdevelopment.exp: $(BFDDIR)/development.sh 1154b169a6bSchristos $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ 1164b169a6bSchristos | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ 117*12989c96Schristos echo "set have_tcl_try @HAVE_TCL_TRY@" >> $@ 1184b169a6bSchristos 1194b169a6bSchristos# development.sh is used to determine -Werror default. 1204b169a6bSchristosCONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh 1214b169a6bSchristos 1224b169a6bSchristosEXTRA_DEJAGNU_SITE_CONFIG = development.exp 1234b169a6bSchristos 1244b169a6bSchristosDISTCLEANFILES += site.exp development.exp 1254b169a6bSchristos 1264b169a6bSchristosinclude doc/local.mk 127