Update year range in copyright notice of binutils files
[binutils-gdb.git] / gprofng / src / Makefile.am
blobfb4b8a0fafa9710b167b58d8d6ec1f484ab0cbf8
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 ../.. 
22 CCSOURCES = \
23         Application.cc \
24         BaseMetric.cc \
25         BaseMetricTreeNode.cc \
26         CallStack.cc \
27         CatchOutOfMemory.cc \
28         ClassFile.cc \
29         Command.cc \
30         CompCom.cc \
31         DataObject.cc \
32         DataSpace.cc \
33         Data_window.cc \
34         DataStream.cc \
35         DbeApplication.cc \
36         DbeFile.cc \
37         DbeJarFile.cc \
38         DbeLock.cc \
39         DbeSession.cc \
40         DbeThread.cc \
41         DbeView.cc \
42         DerivedMetrics.cc \
43         Disasm.cc \
44         Dwarf.cc \
45         DwarfLib.cc \
46         Elf.cc \
47         Emsg.cc \
48         Experiment.cc \
49         Exp_Layout.cc \
50         ExpGroup.cc \
51         Expression.cc \
52         FileData.cc \
53         Filter.cc \
54         FilterSet.cc \
55         Function.cc \
56         HeapMap.cc \
57         HeapData.cc \
58         HeapActivity.cc \
59         Hist_data.cc \
60         IndexObject.cc \
61         IOActivity.cc \
62         LoadObject.cc \
63         MachineModel.cc \
64         MemObject.cc \
65         MemorySpace.cc \
66         Metric.cc \
67         MetricList.cc \
68         Module.cc \
69         Ovw_data.cc \
70         PRBTree.cc \
71         PathTree.cc \
72         PreviewExp.cc \
73         Print.cc \
74         SAXParserFactory.cc \
75         Sample.cc \
76         Settings.cc \
77         SourceFile.cc \
78         Stabs.cc \
79         Stats_data.cc \
80         StringBuilder.cc \
81         Table.cc \
82         QLParser.tab.cc \
83         dbe_collctrl.cc \
84         i18n.cc \
85         parse.cc \
86         UserLabel.cc \
87         util.cc \
88         Dbe.cc \
89         $(NULL)
91 CSOURCES = \
92         dbe_hwcdrv.c \
93         dbe_hwcfuncs.c \
94         dbe_hwctable.c \
95         dbe_memmgr.c \
96         gethrtime.c \
97         $(NULL)
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.
104 ZLIB = @zlibdir@ -lz
105 ZLIBINC = @zlibinc@
107 LOCALEDIR = @localedir@
108 SYSCONFDIR = @sysconfdir@
110 AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
111         -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DLIBDIR=\"$(libdir)\" \
112         -I.. -I$(srcdir) \
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."; \
126           exit 1; \
127         fi; \
128         $(BISON) $^
130 QLParser.tab.cc: QLParser.tab.hh
131         touch $@
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)
138 diststuff: info
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 \
149         $(GPROFNG_LIBADD) \
150         -lpthread -ldl
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