summaryrefslogtreecommitdiff
path: root/gprofng/testsuite/gprofng.display/synprog/Makefile
blob: 7c50ea2e6297645dcc3926387e5a26dc6f6c3776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#   Copyright (C) 2021 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.

TARGETS     = synprog so_syn.so so_syx.so
TARGET      = ./synprog
ACCT_FILE   = synprog.acct

srcdir = .
include $(srcdir)/../../lib/Makefile.skel

SRCS = \
	$(srcdir)/../mttest/gethrtime.c \
	$(srcdir)/synprog.c \
	$(srcdir)/callso.c \
	$(srcdir)/callsx.c \
	$(srcdir)/endcases.c \
	$(srcdir)/fitos.c \
	$(srcdir)/iosyn.c \
	$(srcdir)/pagethrash.c \
	$(srcdir)/stopwatch.c \
	$(NULL)

HDRS= \
	$(srcdir)/inc_body.h \
	$(srcdir)/inc_brace.h \
	$(srcdir)/inc_entry.h \
	$(srcdir)/inc_exit.h \
	$(srcdir)/inc_func.h \
	$(srcdir)/inc_inline.h \
	$(srcdir)/inc_macro.h \
	$(srcdir)/stopwatch.h \
	$(NULL)


$(TARGET): $(SRCS) $(HDRS) so_syx.so so_syn.so
	@echo " ---- Build: $@ -----"
	$(CC) $(CFLAGS) -o $@ $(SRCS) -ldl -lc -lrt

so_syx.so: $(srcdir)/so_syx.c
	@echo " ---- Build: $@ -----"
	$(CC) $(CFLAGS) $(SHAREDOPT) -o $@ $(srcdir)/so_syx.c -lc

so_syn.so: $(srcdir)/so_syn.c
	@echo " ---- Build: $@ -----"
	$(CC) $(CFLAGS) $(SHAREDOPT) -o $@ $(srcdir)/so_syn.c -lc

$(EXPERIMENT): $(TARGETS)
	rm -rf $@
	$(COLLECT) $(COLLECT_FLAGS) -o $@ $(TARGET) $(TARGET_FLAGS)