/
Makefile.am
58 lines (46 loc) · 1.31 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
AM_CFLAGS = -Isrc
AM_LDFLAGS =
if ENABLE_COVERAGE
AM_CFLAGS += --coverage
AM_LDFLAGS += --coverage
GCOV ?= gcov --relative-only --object-directory src/.libs
coverage-reset:
@find . -name '*.gcno' -or -name '*.gcda' -or -name '*.gcov' -delete
coverage: $(libargparse_la_SOURCES)
$(GCOV) $^
coverage-func: $(libargparse_la_SOURCES)
$(GCOV) --function-summaries $^
endif # ENABLE_COVERAGE
lib_LTLIBRARIES = libargparse.la
libargparse_la_SOURCES = src/argparse.c \
src/subcommand.h \
src/subcommand.c \
src/subcommands.h \
src/subcommands.c \
src/operand.h \
src/operand.c \
src/option.h \
src/option.c \
src/parse.c
libargparse_la_LDFLAGS = -version-info 0:1:0
include_HEADERS = src/argparse.h
if ENABLE_CHECKS
TESTS = tests/argparse \
tests/subcommands \
tests/subcommand \
tests/operand \
tests/option \
tests/parse
check_PROGRAMS = $(TESTS)
CFLAGS += -Itests -lcmocka
LDADD = libargparse.la
tests_argparse_SOURCES = tests/common.c tests/argparse.c
tests_subcommands_SOURCES = tests/common.c tests/subcommands.c
tests_subcommand_SOURCES = tests/common.c tests/subcommand.c
tests_operand_SOURCES = tests/common.c tests/operand.c
tests_option_SOURCES = tests/common.c tests/option.c
tests_parse_SOURCES = tests/common.c tests/parse.c
endif # ENABLE_CHECKS
@DX_RULES@
clean-doc:
rm -rf doc