forked from mrtazz/restclient-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
54 lines (37 loc) · 2 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
ACLOCAL_AMFLAGS=-I m4
CPPFLAGS=-I${top_srcdir}/include
check_PROGRAMS = test-program
pkginclude_HEADERS = include/restclient-cpp/restclient.h include/restclient-cpp/version.h include/restclient-cpp/connection.h include/restclient-cpp/helpers.h
BUILT_SOURCES = include/restclient-cpp/version.h
test_program_SOURCES = vendor/jsoncpp-0.10.5/dist/jsoncpp.cpp test/tests.cpp test/test_helpers.cc test/test_restclient.cc test/test_connection.cc
test_program_LDADD = .libs/librestclient-cpp.a
test_program_LDFLAGS=-Lvendor/gtest-1.7.0/lib/.libs -lgtest
test_program_CPPFLAGS=-std=c++11 -Iinclude -Ivendor/gtest-1.7.0/include -Ivendor/jsoncpp-0.10.5/dist
lib_LTLIBRARIES=librestclient-cpp.la
librestclient_cpp_la_SOURCES=source/restclient.cc source/connection.cc source/helpers.cc
librestclient_cpp_la_CXXFLAGS=-fPIC -std=c++11
librestclient_cpp_la_LDFLAGS=-version-info 2:1:1
dist_doc_DATA = README.md
.PHONY: test check clean-coverage-files coverage-html include/restclient-cpp/version.h lint ci docker-services
include/restclient-cpp/version.h:
m4 -I ${top_srcdir}/m4 -DM4_RESTCLIENT_VERSION=$(PACKAGE_VERSION) version.h.m4 > ${top_srcdir}/$@
test: check
./test-program
valgrind: check
valgrind --leak-check=full --error-exitcode=1 ./test-program
lint:
cpplint --filter=-legal/copyright include/restclient-cpp/*.h source/*.cc
docker-services:
docker inspect --format="{{ .State.Running }}" restclient-proxy &> /dev/null || docker run -d --name restclient-proxy -p 3128:3128 chrisdaish/squid
docker ps -a
ci: lint docker-services test valgrind
clean-local:
find . -name "*.gcda" -print0 | xargs -0 rm
coverage.info: test
lcov --compat-libtool --capture --directory source --output-file coverage.info
lcov --compat-libtool --remove coverage.info "/usr*" -o coverage.info
coverage-html: coverage.info
genhtml -t "restclient-cpp coverage report" --legend --show-details coverage.info --output-directory html
# include other make targets in the main Makefile
include $(srcdir)/Makefile.packaging.mk
include $(srcdir)/Makefile.docs.mk