forked from wayfair/statsdcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
40 lines (31 loc) · 1023 Bytes
/
makefile
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
SHELL = /bin/bash
INSTALL = install
PREFIX = $(DESTDIR)
BINDIR = $(PREFIX)/usr/bin
ETCDIR = $(PREFIX)/etc
all: ./build
@ (cd build >/dev/null 2>&1 && cmake -D test=true ..)
@ $(MAKE) -C build
debug: ./build
@ (cd build >/dev/null 2>&1 && cmake -D debug=true -D test=true ..)
@ $(MAKE) -C build
./build:
@ mkdir ./build
test: all
@ (cd build && ctest)
clean:
@- (cd build >/dev/null 2>&1 && cmake .. >/dev/null 2>&1)
@- $(MAKE) --silent -C build clean || true
@- rm -rf ./build/*
lint:
find ./src ./include ./test -type f | xargs python2.7 ./vendor/cpplint/cpplint.py 2>&1 >/dev/null | grep -v 'No copyright message found'
install:
$(INSTALL) -D ./build/src/statsdcc $(BINDIR)/statsdcc
$(INSTALL) -D ./build/src/proxy $(BINDIR)/statsdcc-proxy
$(INSTALL) -D ./etc/proxy.json $(ETCDIR)/statsdcc/proxy.json.example
$(INSTALL) -D ./etc/aggregator.json $(ETCDIR)/statsdcc/aggregator.json.example
uninstall:
rm $(BINDIR)/statsdcc
rm $(BINDIR)/statsdcc-proxy
debsrc:
debuild -S -sa --lintian-opts -i