This repository has been archived by the owner on Dec 8, 2023. It is now read-only.
forked from statsite/statsite
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
120 lines (91 loc) · 3.02 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS := subdir-objects
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = deps/ae deps/inih deps/murmurhash man .
AM_CFLAGS = -g -std=gnu99 -pthread -D_GNU_SOURCE -DLOG_PERROR=0 -O3 -pthread -lm @LINK_TO_RT@ -Ideps/inih/ -Ideps/ae/ -Isrc/
#=========================================================
# statsite, the binary itself
statsite_SOURCES = \
src/ascii_parser.c \
src/hashmap.c \
src/heap.c \
src/radix.c \
src/hll_constants.c \
src/hll.c \
src/set.c \
src/cm_quantile.c \
src/timer.c \
src/counter.c \
src/metrics.c \
src/streaming.c \
src/config.c \
src/networking.c \
src/conn_handler.c \
src/statsite.c
statsite_LDADD = deps/ae/libae.a deps/inih/libinih.a deps/murmurhash/libmurmur.a
## Install directions:
bin_PROGRAMS = statsite
# This adds the sinks on make install, also allows for make uninstall if needed
nobase_pkgdata_DATA = sinks/*
configdir = /etc/statsite
nobase_dist_config_DATA = statsite.conf.example
## Stuff we want to include for the default dist task (not sdist)
EXTRA_DIST = . #everything
## Where to store the dist
distdir = ../$(PACKAGE)-$(VERSION)
#libcheck
if HAVE_CHECK
check_PROGRAMS = tests/runner
tests_runner_SOURCES = \
src/ascii_parser.c \
src/hashmap.c \
src/heap.c \
src/radix.c \
src/hll_constants.c \
src/hll.c \
src/set.c \
src/cm_quantile.c \
src/timer.c \
src/counter.c \
src/metrics.c \
src/streaming.c \
src/config.c \
src/networking.c \
src/conn_handler.c \
tests/runner.c
tests_runner_CFLAGS = -g -std=gnu99 -pthread -D_GNU_SOURCE -DLOG_PERROR=0 -O3 -pthread -lm @LINK_TO_RT@ -Ideps/inih/ -Ideps/ae/ -Isrc/
tests_runner_LDFLAGS = -g -pg -no-install
tests_runner_LDADD = deps/ae/libae.a deps/inih/libinih.a deps/murmurhash/libmurmur.a @CHECK_LIBS@
TESTS = tests/runner
TESTS_ENVIRONMENT = CK_FORK=yes
CK_VERBOSITY = verbose
CLEANFILES = tests/test_runner.log
endif
# Targets
test: integ
integ: all
py.test integ/
sdist: clean
mkdir -vp /tmp/statsite-@STATSITE_VERSION@
cp -R . /tmp/statsite-@STATSITE_VERSION@
tar -zcv --exclude='.git' --exclude='.gitignore' -f statsite-@STATSITE_VERSION@.tar.gz -C /tmp statsite-@STATSITE_VERSION@
rm -r /tmp/statsite-@STATSITE_VERSION@
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
test ! -f ".sconsign.dblite" || rm -f .sconsign.dblite
test ! -d "deps/check-0.9.8/src/.libs" || rm -fr deps/check-0.9.8/src/.libs
RPMBUILDROOT=/tmp/rpm-build
rpms: sdist build
mkdir -vp $(RPMBUILDROOT)
cp -v *.tar.gz $(RPMBUILDROOT)
cp -v rpm/statsite.spec $(RPMBUILDROOT)
rpmbuild --define "_topdir $(RPMBUILDROOT)" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir %{_topdir}" \
--define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
--define "_sourcedir %{_topdir}" \
-ba $(RPMBUILDROOT)/statsite.spec
.PHONY: all test clean sdist build