1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 2021-2024 Free Software Foundation, Inc.
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 3 of the License, or
8 # (at your option) any later version.
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.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 AUTOMAKE_OPTIONS = foreign
20 ACLOCAL_AMFLAGS = -I . -I .. -I ../..
25 BaseMetricTreeNode.cc \
99 LIBGPROFNG = libgprofng.la
101 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
102 # -I../zlib, unless we were configured with --with-system-zlib, in which
103 # case both are empty.
107 LOCALEDIR = @localedir@
108 SYSCONFDIR = @sysconfdir@
110 AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
111 -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DLIBDIR=\"$(libdir)\" \
113 -I$(srcdir)/../common \
114 -I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
115 -I../../bfd -I$(srcdir)/../../bfd $(ZLIBINC)
116 AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_CFLAGS) \
117 $(GPROFNG_NO_SWITCH_CFLAGS)
118 AM_CXXFLAGS = $(AM_CFLAGS)
120 # bison generates two files QLParser.tab.cc, QLParser.tab.hh.
121 # we don't know which file will be newer.
122 # Make QLParser.tab.cc always newer than QLParser.tab.hh.
123 QLParser.tab.hh: QLParser.yy
124 if test "$(BISON)" = ":"; then \
125 echo "fatal: Building gprofng requires bison 3.0.4 or later."; \
130 QLParser.tab.cc: QLParser.tab.hh
133 BUILT_SOURCES = QLParser.tab.cc QLParser.tab.hh
134 EXTRA_DIST = QLParser.tab.cc QLParser.tab.hh QLParser.yy
136 # info and diststuff are needed for src-release.sh:
137 info: $(BUILT_SOURCES)
140 lib_LTLIBRARIES = $(LIBGPROFNG)
141 libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES)
142 libgprofng_la_LDFLAGS = -version-info 0:0:0
144 # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being empty
145 # when -nostdlib is passed to libtool.
146 # See bug 29364 - libgprofng.so: needs to link against -pthread
147 libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \
148 $(top_builddir)/../bfd/libbfd.la \
152 dbedir = $(SYSCONFDIR)
153 dbe_DATA = $(srcdir)/gprofng.rc
156 bin_PROGRAMS = gp-archive gp-collect-app gprofng gp-display-text gp-display-src
158 gp_archive_SOURCES = gp-archive.cc ArchiveExp.cc
159 gp_archive_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
161 gp_collect_app_SOURCES = gp-collect-app.cc checks.cc envsets.cc count.cc
162 gp_collect_app_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
164 gprofng_SOURCES = gprofng.cc
165 gprofng_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
167 gp_display_src_SOURCES = gp-display-src.cc
168 gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
170 gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc
171 gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
173 # Distribution involves building the binaries to generate the manpage,
174 # so ensure that the necessary libraries are built at dist time.
175 dist-hook: $(LIBGPROFNG)
177 $(srcdir)/DbeSession.cc: QLParser.tab.hh