Makefile.am 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ## Process this file with automake to produce Makefile.in.
  2. #
  3. # Copyright (C) 2019-2022 Free Software Foundation, Inc.
  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. ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
  20. AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex
  21. # Variables that we might accumulate conditionally or in subdirs.
  22. info_TEXINFOS =
  23. DISTCLEANFILES =
  24. MAINTAINERCLEANFILES =
  25. # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
  26. # -I../zlib, unless we were configured with --with-system-zlib, in which
  27. # case both are empty.
  28. ZLIB = @zlibdir@ -lz
  29. ZLIBINC = @zlibinc@
  30. BASEDIR = $(srcdir)/..
  31. BFDDIR = $(BASEDIR)/bfd
  32. INCDIR = $(srcdir)/../include
  33. AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../bfd -I../bfd @INCINTL@
  34. AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ $(ZLIBINC)
  35. if INSTALL_LIBBFD
  36. lib_LTLIBRARIES = libctf.la libctf-nobfd.la
  37. include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h
  38. else
  39. include_HEADERS =
  40. noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
  41. endif
  42. libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
  43. libctf_ldflags_nover = -version-info 0:0:0 @SHARED_LDFLAGS@
  44. libctf_nobfd_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS_NOBFD@
  45. libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
  46. libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \
  47. ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \
  48. ctf-open.c ctf-serialize.c ctf-sha1.c ctf-string.c ctf-subr.c \
  49. ctf-types.c ctf-util.c
  50. if NEED_CTF_QSORT_R
  51. libctf_nobfd_la_SOURCES += ctf-qsort_r.c
  52. endif
  53. # @CTF_LIBADD@ appears here twice: once, to force libiberty to get searched before
  54. # install-time libbfd adds a -L to the install dir (possibly pointing at an
  55. # incompatible libiberty), and once via lictf_nobfd_la_LIBADD so that the
  56. # references in there get picked up.
  57. libctf_la_LIBADD = @CTF_LIBADD@ ../bfd/libbfd.la $(libctf_nobfd_la_LIBADD)
  58. libctf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=0
  59. libctf_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS@
  60. libctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c
  61. # Setup the testing framework, if you have one
  62. EXPECT = expect
  63. RUNTEST = runtest
  64. RUNTESTFLAGS =
  65. if TCL_TRY
  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. check-DEJAGNU: site.exp development.exp
  81. srcroot=`cd $(srcdir) && pwd`; export srcroot; \
  82. r=`pwd`; export r; \
  83. LC_ALL=C; export LC_ALL; \
  84. EXPECT=$(EXPECT); export EXPECT; \
  85. runtest=$(RUNTEST); \
  86. if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
  87. $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
  88. CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \
  89. CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
  90. LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
  91. else echo "WARNING: could not find \`runtest'" 1>&2; :;\
  92. fi
  93. development.exp: $(BFDDIR)/development.sh
  94. $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
  95. | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
  96. # development.sh is used to determine -Werror default.
  97. CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
  98. EXTRA_DEJAGNU_SITE_CONFIG = development.exp
  99. DISTCLEANFILES += site.exp development.exp
  100. endif
  101. include doc/local.mk