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