Commit | Line | Data |
---|---|---|
65385a82 MJ |
1 | objcopy_verbose = $(objcopy_verbose_@AM_V@) |
2 | objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@) | |
3 | objcopy_verbose_0 = @echo OBJCOPY $@; | |
4 | ||
d4f53cc3 AB |
5 | AM_CPPFLAGS = -I$(srcdir) -g |
6 | ||
7 | noinst_PROGRAMS = prog | |
8 | prog_SOURCES = prog.c tp.c tp.h | |
9 | prog_LDADD = -llttng-ust -ldl | |
10 | ||
11 | noinst_SCRIPTS = test_baddr-statedump test_baddr-statedump.py | |
12 | EXTRA_DIST = test_baddr-statedump test_baddr-statedump.py | |
13 | ||
65385a82 MJ |
14 | # Extract debug symbols |
15 | prog.debug: prog | |
16 | $(objcopy_verbose)$(OBJCOPY) --only-keep-debug prog prog.debug | |
17 | ||
18 | # Strip and add debuglink | |
19 | prog.strip: prog.debug | |
20 | @cp -f prog prog.strip | |
21 | $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=prog.debug prog.strip | |
22 | ||
23 | all-local: prog.strip | |
d4f53cc3 AB |
24 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
25 | for script in $(EXTRA_DIST); do \ | |
26 | cp -f $(srcdir)/$$script $(builddir); \ | |
27 | done; \ | |
28 | fi | |
d4f53cc3 AB |
29 | |
30 | clean-local: | |
31 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
32 | for script in $(EXTRA_DIST); do \ | |
33 | rm -f $(builddir)/$$script; \ | |
34 | done; \ | |
35 | fi | |
65385a82 MJ |
36 | |
37 | CLEANFILES = prog.debug prog.strip |