aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
blob: e124863d36b53a2b0fc37fceb533ba31203bfa5d (plain)
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
include Makefile.am.coverage
ACLOCAL_AMFLAGS=-I m4

# building librb library

include_HEADERS = rb.h

lib_LTLIBRARIES = librb.la
librb_la_SOURCES = rb.c valid.h
librb_la_LDFLAGS = -version-info 2:0:1
librb_la_CFLAGS = -I$(top_srcdir)

# building test suite

check_PROGRAMS = tests
tests_SOURCES = rb.c tests.c mtest.h
tests_CFLAGS = -I$(top_srcdir) $(COVERAGE_CFLAGS)
tests_LDFLAGS = $(COVERAGE_LDFLAGS)

TESTS = $(check_PROGRAMS)
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
	$(top_srcdir)/tap-driver.sh

# static code analyzer

if ENABLE_ANALYZER

analyze_plists = rb.plist
MOSTLYCLEANFILES = $(analyze_plists)

$(analyze_plists): %.plist: %.c
	@echo "  CCSA  " $@
	@clang --analyze -I$(top_srcdir) -DHAVE_CONFIG_H $< -o $@

analyze: $(analyze_plists)

endif

# building website and manuals

SUBDIRS = man www examples
EXTRA_DIST = gen-download-page.sh man2html.sh readme.md tap-driver.sh

www:
	./gen-download-page.sh
	./man2html.sh
	make www -C www

examples:
	make examples -C examples

# clean targets

clean_targets=

if HAVE_GCOV
clean_targets += clean-gcov
endif

clean-local: $(clean_targets)

.PHONY: examples clean_www www analyze tests librb.la