-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
57 lines (49 loc) · 1.3 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Makefile
#
# PROJECT: skinnycat
# DESCRIPTION: Small shell utility providing basic Skinny Cisco
# protocol messages exchange
#
# Copyright (C) 2016 Stas Kobzat <[email protected]>
#
# TARGETS:
# all -- build project
# test -- run unit tests with cmocka and functional tests with dejagnu
# ctags -- generate ctags for vim
# doc -- generate documentation with doxygen
# cov -- generate tests coverage report
# clean -- clean up
PROJECT := skinnycat
PKG_CFG := $(shell which pkg-config)
TARGET := bin/$(PROJECT)
BUILDDIR := build
SRCDIR := src
DOCS := doc
ifndef PKG_CFG
$(error Not found pkg-config utility.\
Install pkg-config package before continue)
endif
include src/Makefile
include tests/Makefile
.PHONY: doc
doc:
@doxygen $(DOCS)/Doxygen
@echo "Documentation generated."
.PHONY: ctags
# generate ctags for vim
# requires apr-1 source in root
ctags:
@echo "Building tags"
@test ! -d apr-1.5.2 && \
wget http://apache.mirror.iweb.ca//apr/apr-1.5.2.tar.gz && \
tar xfz apr-1.5.2.tar.gz && rm apr-1.5.2.tar.gz; :
@ctags -R src apr-1.5.2 2> /dev/null
.PHONY: clean
clean: test_clean
@echo Clean built objects
@rm -f $(BUILDDIR)/*.o $(TARGET)
@echo Clean documentation
@rm -rf $(DOCS)/html
@echo Clean test coverage reports
@rm -rf cov/*