File: Makefile.am

package info (click to toggle)
systemtap 5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,556 kB
  • sloc: cpp: 81,117; ansic: 54,933; xml: 49,795; exp: 43,595; sh: 11,526; python: 5,003; perl: 2,252; tcl: 1,312; makefile: 1,006; javascript: 149; lisp: 105; awk: 101; asm: 91; java: 70; sed: 16
file content (85 lines) | stat: -rw-r--r-- 2,854 bytes parent folder | download
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Makefile.am --- automake input file for systemtap runtime tools

AUTOMAKE_OPTIONS = subdir-objects

AM_CFLAGS = -Wall -Wextra -Wunused -W -Wformat=2
AM_CXXFLAGS = -Wall -Wextra -Wunused -W -Wformat=2
if Werror
AM_CFLAGS += -Werror
AM_CXXFLAGS += -Werror
endif
AM_CPPFLAGS = -D_GNU_SOURCE
AM_CPPFLAGS += -I$(srcdir)/../includes
AM_CPPFLAGS += -I$(builddir)/../includes/sys
AM_CPPFLAGS += -DBINDIR='"$(bindir)"' -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' -DLOCALEDIR='"$(localedir)"'

AM_CFLAGS += @PIECFLAGS@
AM_CXXFLAGS += @PIECXXFLAGS@
AM_LDFLAGS = @PIELDFLAGS@

bin_PROGRAMS = staprun stap-merge stapsh
pkglibexec_PROGRAMS = stapio

# Tighten -Wno-format-nonliteral to just where it's needed.
# See the automake manual secton: "Per-Object Flags Emulation"
#   https://www.gnu.org/software/automake/manual/html_node/Per_002dObject-Flags.html
noinst_LIBRARIES = libstrfloctime.a
libstrfloctime_a_SOURCES = strfloctime.c
libstrfloctime_a_CFLAGS = $(AM_CFLAGS) -Wno-format-nonliteral

staprun_SOURCES = staprun.c staprun_funcs.c ctl.c common.c start_cmd.c \
	../privilege.cxx ../staputil.cxx
staprun_CFLAGS = $(AM_CFLAGS) -DSINGLE_THREADED $(debuginfod_CFLAGS)
staprun_CXXFLAGS = $(AM_CXXFLAGS) -DSINGLE_THREADED $(debuginfod_CFLAGS)
staprun_CPPFLAGS = $(AM_CPPFLAGS)
staprun_LDADD = libstrfloctime.a $(staprun_LIBS) $(debuginfod_LIBS)
staprun_LDFLAGS =  $(AM_LDFLAGS) -Wl,--whole-archive,libstrfloctime.a,--no-whole-archive $(debuginfod_LDFLAGS)

if HAVE_NSS
staprun_SOURCES += modverify.c ../nsscommon.cxx
staprun_CFLAGS += $(nss_CFLAGS)
staprun_CXXFLAGS += $(nss_CFLAGS)
staprun_LDADD += $(nss_LIBS)
endif

if HAVE_HTTP_SUPPORT
staprun_LDADD += $(openssl_LIBS)
endif

stapio_SOURCES = stapio.c mainloop.c common.c start_cmd.c ctl.c relay.c monitor.c
stapio_LDADD =  libstrfloctime.a -lpthread
stapio_LDFLAGS =  -Wl,--whole-archive,libstrfloctime.a,--no-whole-archive

if HAVE_MONITOR_LIBS
stapio_LDADD += $(jsonc_LIBS) -lpanel $(ncurses_LIBS)
endif

man_MANS = staprun.8

stap_merge_SOURCES = stap_merge.c
stap_merge_CFLAGS = $(AM_CFLAGS)
stap_merge_LDFLAGS = $(AM_LDFLAGS)
stap_merge_LDADD =

stapsh_SOURCES = stapsh.c
stapsh_CFLAGS = $(AM_CFLAGS)
stapsh_LDFLAGS = $(AM_LDFLAGS)
stapsh_LDADD =

BUILT_SOURCES =
CLEANFILES =

# Arrange for the top-level git_version.h to be regenerated at every "make".
BUILT_SOURCES += git_version.stamp
git_version.stamp ../git_version.h:
	$(MAKE) -C .. $(notdir $@)


# Why the "id -u" condition?  This way, an unprivileged user can run
# make install, and have "sudo stap ...." or "sudo staprun ...." work later.
install-exec-hook:
	if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \
	                         || groupadd -f -g 156 -r stapusr); then \
		chgrp stapusr "$(DESTDIR)$(bindir)/staprun" \
		&& chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \
	fi