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
|
# 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@
if HAVE_BPF_DECLS
bin_PROGRAMS = stapbpf
man_MANS = stapbpf.8
stapbpf_SOURCES = stapbpf.cxx bpfinterp.cxx libbpf.c ../staputil.cxx \
../staprun/start_cmd.c
stapbpf_CPPFLAGS = $(AM_CPPFLAGS)
stapbpf_CFLAGS = $(AM_CFLAGS) $(debuginfod_CFLAGS)
stapbpf_CXXFLAGS = $(AM_CXXFLAGS) $(debuginfod_CFLAGS)
stapbpf_LDFLAGS = $(AM_LDFLAGS) $(debuginfod_LDFLAGS)
stapbpf_LDADD = $(stapbpf_LIBS) -lpthread $(debuginfod_LIBS)
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 stapbpf ...." 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)/stapbpf" \
&& chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
fi
endif
|