-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile.am
104 lines (84 loc) · 4.38 KB
/
Makefile.am
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
## Process this file with automake to produce Makefile.in
# This is so we can #include <google/foo>
AM_CPPFLAGS = -I$(top_srcdir)/src
googleincludedir = $(includedir)/google
## The .h files you want to install (that is, .h files that people
## who install this package can include in their own applications.)
googleinclude_HEADERS =
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
## This is for HTML and other documentation you want to install.
## Add your documentation files (in doc/) in addition to these
## top-level boilerplate files. Also add a TODO file if you have one.
dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
## The libraries (.so's) you want to install
lib_LTLIBRARIES =
## unittests you want to run when people type 'make check'.
## TESTS is for binary unittests, check_SCRIPTS for script-based unittests.
## TESTS_ENVIRONMENT sets environment variables for when you run unittest,
## but it only seems to take effect for *binary* unittests (argh!)
TESTS =
check_SCRIPTS =
TESTS_ENVIRONMENT =
# Every time you add a unittest to check_SCRIPTS, add it here too
noinst_SCRIPTS =
# The manual pages that should be installed
man3_MANS = man/GetCoreDump.man man/WriteCoreDump.man \
man/CoreDumpParameters.man
install-data-hook:
ln -sf GetCoreDump.3 $(DESTDIR)$(man3dir)/GetCompressedCoreDump.3
ln -sf GetCoreDump.3 $(DESTDIR)$(man3dir)/GetCoreDumpWith.3
ln -sf WriteCoreDump.3 $(DESTDIR)$(man3dir)/WriteCompressedCoreDump.3
ln -sf WriteCoreDump.3 $(DESTDIR)$(man3dir)/WriteCoreDumpWith.3
ln -sf WriteCoreDump.3 $(DESTDIR)$(man3dir)/WriteCoreDumpLimited.3
ln -sf WriteCoreDump.3 $(DESTDIR)$(man3dir)/WriteCoreDumpLimitedByPriority.3
ln -sf CoreDumpParameters.3 $(DESTDIR)$(man3dir)/ClearCoreDumpParameters.3
ln -sf CoreDumpParameters.3 $(DESTDIR)$(man3dir)/SetCoreDumpLimited.3
ln -sf CoreDumpParameters.3 $(DESTDIR)$(man3dir)/SetCoreDumpCompressed.3
ln -sf CoreDumpParameters.3 $(DESTDIR)$(man3dir)/SetCoreDumpLimitedByPriority.3
ln -sf CoreDumpParameters.3 $(DESTDIR)$(man3dir)/SetCoreDumpNotes.3
uninstall-hook:
rm -f $(DESTDIR)$(man3dir)/GetCompressedCoreDump.3
rm -f $(DESTDIR)$(man3dir)/GetCoreDumpWith.3
rm -f $(DESTDIR)$(man3dir)/WriteCoreDumpWith.3
rm -f $(DESTDIR)$(man3dir)/WriteCompressedCoreDump.3
rm -f $(DESTDIR)$(man3dir)/WriteCoreDumpLimited.3
rm -f $(DESTDIR)$(man3dir)/WriteCoreDumpLimitedByPriority.3
rm -f $(DESTDIR)$(man3dir)/ClearCoreDumpParameters.3
rm -f $(DESTDIR)$(man3dir)/SetCoreDumpLimited.3
rm -f $(DESTDIR)$(man3dir)/SetCoreDumpCompressed.3
rm -f $(DESTDIR)$(man3dir)/SetCoreDumpLimitedByPriority.3
rm -f $(DESTDIR)$(man3dir)/SetCoreDumpNotes.3
## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
lib_LTLIBRARIES += libcoredumper.la
LIBCOREDUMPER_INCLUDES = src/google/coredumper.h src/elfcore.h \
src/linux_syscall_support.h src/linuxthreads.h \
src/thread_lister.h
googleinclude_HEADERS += src/google/coredumper.h
libcoredumper_la_SOURCES = src/coredumper.c \
src/thread_lister.c \
src/elfcore.c \
src/linuxthreads.c \
$(LIBCOREDUMPER_INCLUDES)
libcoredumper_la_LDFLAGS = -export-symbols $(top_srcdir)/src/libcoredumper.sym \
-version-info 1:0:0
TESTS += coredumper_unittest linux_syscall_support_unittest
COREDUMP_UNITTEST_INCLUDES = src/google/coredumper.h
coredumper_unittest_SOURCES = src/coredumper_unittest.c
coredumper_unittest_LDADD = libcoredumper.la -lpthread
LINUX_SYSCALL_SUPPORT_INCLUDES = src/linux_syscall_support.h
linux_syscall_support_unittest_SOURCES = src/linux_syscall_support_unittest.cc
## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
## This should always include $(TESTS), but may also include other
## binaries that you compile but don't want automatically installed.
noinst_PROGRAMS = $(TESTS)
rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
@cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
deb: dist-gzip packages/deb.sh packages/deb/*
@cd packages && ./deb.sh ${PACKAGE} ${VERSION}
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
EXTRA_DIST = ${man3_MANS} man/GetCoreDump.man man/WriteCoreDump.man \
packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh \
packages/deb libtool src/libcoredumper.sym examples/Makefile \
examples/tftpd.c
DISTCLEANFILES = core-test