-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile.am
133 lines (118 loc) · 2.86 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
121
122
123
124
125
126
127
128
129
130
131
132
133
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = external
if ENABLE_LUA_BINDINGS
SUBDIRS += lua
endif
SUBDIRS += src scripts docs
if ENABLE_EXAMPLES
SUBDIRS += examples
endif
SUBDIRS += test
EXTRA_DIST = README.md \
CONTRIBUTING.md \
CODE_OF_CONDUCT.md \
COPYING
.PHONY: docs docset
docs docset:
if HAVE_DOXYGEN_BIN
@cd docs && $(MAKE) $(AM_MAKEFLAGS) $@
else
@echo "configured without doxygen" >&2; \
exit 1
endif
ASTYLE_WILDCARDS = \
"$(top_srcdir)/examples/\*.cpp" \
"$(top_srcdir)/include/egt/\*.h" \
"$(top_srcdir)/src/\*.c" \
"$(top_srcdir)/src/\*.cpp" \
"$(top_srcdir)/src/\*.h" \
"$(top_srcdir)/test/\*.cpp"
.PHONY: style
style:
if HAVE_ASTYLE_BIN
ASTYLE_BIN=$(ASTYLE_BIN) $(top_srcdir)/scripts/style.sh --recursive $(ASTYLE_WILDCARDS) \
--exclude=images/jpeg -i
else
@echo "configured without astyle" >&2; \
exit 1
endif
if ENABLE_ICONS
iconsdir = $(pkgdatadir)
include $(top_srcdir)/icons/Makefile.icons
nobase_dist_icons_DATA = $(PNG_ICONS_FILES)
endif
CPPCHECK_CMD = $(CPPCHECK_BIN) \
--output-file=cppcheck.log \
--inline-suppr \
--suppress=*:*asio/* \
--config-exclude=include/egt/asio/ \
--config-exclude=include/egt/asio.hpp \
--error-exitcode=0 \
-j 4 \
--force \
--language=c++ \
--std=c++17 \
--platform=unix32 \
--template=gcc \
-UTSLIB_MT_VALID \
-UEXAMPLEDATA \
-ULUA_INIT_VAR \
-ULUA_MAXINPUT \
-ULUA_PROGNAME \
-ULUA_PROMPT \
-ULUA_USE_POSIX \
-ULUA_USE_READLINE \
-ULUA_USE_WINDOWS \
-UPACKAGE_VERSION \
-USRCDIR \
-I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src/images/jpeg
CPPCHECK_DIRS = \
$(top_srcdir)/include/egt/ \
$(top_srcdir)/src/ \
$(top_srcdir)/examples/
cppcheck:
if HAVE_CPPCHECK_BIN
$(CPPCHECK_CMD) --enable=all $(CPPCHECK_DIRS)
else
@echo "configured without cppcheck" >&2; \
exit 1
endif
lc:
find $(top_srcdir)/include/ $(top_srcdir)/src/ $(top_srcdir)/examples/ \
-name '*.h' -o -name '*.c' -o -name '*.cpp' | xargs wc -l
if HAVE_CLOC_BIN
cloc:
$(CLOC_BIN) --by-file `find $(top_srcdir)/include/ $(top_srcdir)/src/ \
$(top_srcdir)/examples/ -name '*.h' -o -name '*.c' -o -name '*.cpp'`
$(CLOC_BIN) `find $(top_srcdir)/include/ $(top_srcdir)/src/ \
$(top_srcdir)/examples/ -name '*.h' -o -name '*.c' -o -name '*.cpp'`
endif
MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
config.h.in \
configure \
depcomp \
install-sh \
missing \
config.guess \
config.rpath \
compile \
config.h.in~ \
config.sub \
ltmain.sh \
test-driver
tidy:
@cd src && $(MAKE) $(AM_MAKEFLAGS) $@
@cd examples && $(MAKE) $(AM_MAKEFLAGS) $@
if HAVE_ASPELL_BIN
SPELLCHECK_FILES = `find $(top_srcdir)/docs/src/ $(top_srcdir)/include/ \
$(top_srcdir)/src/ $(top_srcdir)/examples/ -name '*.h' \
-o -name '*.c' -o -name '*.cpp' -o -name '*.dox'`
spellcheck:
for f in $(SPELLCHECK_FILES); do \
$(ASPELL_BIN) --mode=ccpp --dont-backup --personal=$(top_srcdir)/.aspell.en.pws check $$f; \
done
endif
checkheaders:
@cd src && $(MAKE) $(AM_MAKEFLAGS) $@