regen config
[binutils-gdb.git] / gprofng / libcollector / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2 #
3 # Copyright (C) 2021-2023 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 3 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 COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
18
19 AUTOMAKE_OPTIONS = foreign
20 ACLOCAL_AMFLAGS = -I . -I ../..
21
22 CSOURCES = \
23 gethrtime.c \
24 dispatcher.c \
25 iolib.c \
26 mmaptrace.c \
27 memmgr.c \
28 tsd.c \
29 profile.c \
30 envmgmt.c \
31 linetrace.c \
32 libcol_hwcdrv.c \
33 libcol_hwcfuncs.c \
34 libcol-i386-dis.c \
35 hwprofile.c \
36 jprofile.c \
37 unwind.c \
38 libcol_util.c \
39 collector.c \
40 $(NULL)
41
42 AM_CFLAGS = $(GPROFNG_CFLAGS) $(GPROFNG_NO_NONNULL_COMPARE_CFLAGS)
43 AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -I.. -I$(srcdir) \
44 -I$(srcdir)/../common -I$(srcdir)/../src \
45 -I$(srcdir)/../../include
46 AM_LDFLAGS = -module -avoid-version \
47 -Wl,--version-script,$(srcdir)/libgprofng.ver \
48 $(LD_NO_AS_NEEDED) -Wl,-lrt -Wl,-ldl
49
50 myincludedir = @includedir@
51 myinclude_HEADERS = $(srcdir)/../../include/collectorAPI.h \
52 $(srcdir)/../../include/libcollector.h \
53 $(srcdir)/../../include/libfcollector.h
54
55 pkglib_LTLIBRARIES = libgp-collector.la libgp-collectorAPI.la libgp-heap.la \
56 libgp-sync.la libgp-iotrace.la
57
58 libgp_collector_la_SOURCES = $(CSOURCES)
59 libgp_collector_la_CPPFLAGS = $(AM_CPPFLAGS) $(jdk_inc) \
60 -I../../bfd -I$(srcdir)/../..
61 # Prevent libtool from reordering -Wl,--no-as-needed after -lrt by
62 # disguising -lrt as a linker flag.
63 libgp_collector_la_LDFLAGS = $(AM_LDFLAGS)
64 libgp_collector_la_LIBADD = $(CLOCK_GETTIME_LINK)
65
66 libgp_heap_la_SOURCES = heaptrace.c
67 libgp_heap_la_LDFLAGS = $(AM_LDFLAGS)
68
69 libgp_sync_la_SOURCES = synctrace.c
70 libgp_sync_la_LDFLAGS = $(AM_LDFLAGS)
71
72 libgp_iotrace_la_SOURCES = iotrace.c
73 libgp_iotrace_la_LDFLAGS = $(AM_LDFLAGS)
74
75 libgp_collectorAPI_la_SOURCES = collectorAPI.c
76 libgp_collectorAPI_la_LIBADD = -lc -ldl
77
78 .PHONY: install-data-local
79
80 install-data-local: install-pkglibLTLIBRARIES
81 for f in libgp-collector libgp-heap libgp-sync libgp-iotrace ; do \
82 rm -f $(DESTDIR)/$(pkglibdir)/$$f.la $(DESTDIR)/$(pkglibdir)/$$f.a ; \
83 done