libctf, include: support unnamed structure members better
[deliverable/binutils-gdb.git] / libctf / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2 #
3 # Copyright (C) 2019-2021 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
20 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
21
22 AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex
23
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
30 INCDIR = $(srcdir)/../include
31 AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../bfd -I../bfd @INCINTL@
32 AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@ $(ZLIBINC)
33
34 if INSTALL_LIBBFD
35 lib_LTLIBRARIES = libctf.la libctf-nobfd.la
36 include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h
37 else
38 include_HEADERS =
39 noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
40 endif
41
42 libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(LIBINTL) $(ZLIB)
43 libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
44 libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
45 libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \
46 ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \
47 ctf-open.c ctf-sha1.c ctf-string.c ctf-subr.c ctf-types.c \
48 ctf-util.c
49 if NEED_CTF_QSORT_R
50 libctf_nobfd_la_SOURCES += ctf-qsort_r.c
51 endif
52
53 libctf_la_LIBADD = ../bfd/libbfd.la $(libctf_nobfd_la_LIBADD)
54 libctf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=0
55 libctf_la_LDFLAGS = $(libctf_nobfd_la_LDFLAGS)
56 libctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c
57
58 # Setup the testing framework, if you have one
59 EXPECT = expect
60 RUNTEST = runtest
61 RUNTESTFLAGS =
62
63 CC_FOR_TARGET = ` \
64 if [ -f $$r/../gcc/xgcc ] ; then \
65 if [ -f $$r/../newlib/Makefile ] ; then \
66 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
67 else \
68 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
69 fi; \
70 else \
71 if [ "@host@" = "@target@" ] ; then \
72 echo $(CC); \
73 else \
74 echo gcc | sed '$(transform)'; \
75 fi; \
76 fi`
77
78 check-DEJAGNU: site.exp
79 srcroot=`cd $(srcdir) && pwd`; export srcroot; \
80 r=`pwd`; export r; \
81 LC_ALL=C; export LC_ALL; \
82 EXPECT=$(EXPECT); export EXPECT; \
83 runtest=$(RUNTEST); \
84 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
85 $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
86 CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
87 CC_FOR_HOST="$(CC)" LIBS="$(LIBS)" $(RUNTESTFLAGS); \
88 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
89 fi
This page took 0.035625 seconds and 4 git commands to generate.