1## Process this file with automake to generate Makefile.in
2#
3#   Copyright (C) 2021-2024 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
19AUTOMAKE_OPTIONS = foreign
20ACLOCAL_AMFLAGS = -I . -I ../.. 
21
22CSOURCES = \
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
42AM_CFLAGS = $(GPROFNG_CFLAGS) $(GPROFNG_NO_NONNULL_COMPARE_CFLAGS)
43AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -I.. -I$(srcdir) \
44	-I$(srcdir)/../common -I$(srcdir)/../src \
45	-I$(srcdir)/../../include
46AM_LDFLAGS = -module -avoid-version \
47	-Wl,--version-script,$(srcdir)/libgprofng.ver \
48	$(LD_NO_AS_NEEDED) -Wl,-lrt -Wl,-ldl
49
50myincludedir = @includedir@
51myinclude_HEADERS = $(srcdir)/../../include/collectorAPI.h \
52	$(srcdir)/../../include/libcollector.h \
53	$(srcdir)/../../include/libfcollector.h
54
55pkglib_LTLIBRARIES = libgp-collector.la libgp-collectorAPI.la libgp-heap.la \
56	libgp-sync.la libgp-iotrace.la
57
58libgp_collector_la_SOURCES = $(CSOURCES)
59libgp_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.
63libgp_collector_la_LDFLAGS = $(AM_LDFLAGS)
64libgp_collector_la_LIBADD = $(CLOCK_GETTIME_LINK)
65
66libgp_heap_la_SOURCES = heaptrace.c
67libgp_heap_la_LDFLAGS = $(AM_LDFLAGS)
68
69libgp_sync_la_SOURCES = synctrace.c
70libgp_sync_la_LDFLAGS = $(AM_LDFLAGS)
71
72libgp_iotrace_la_SOURCES = iotrace.c
73libgp_iotrace_la_LDFLAGS = $(AM_LDFLAGS)
74
75libgp_collectorAPI_la_SOURCES = collectorAPI.c
76libgp_collectorAPI_la_LIBADD = -lc -ldl
77
78.PHONY: install-data-local
79
80install-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
84