-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile.am
134 lines (112 loc) · 3.13 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
134
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
DIST_SUBDIRS = example
EXTRA_DIST = \
CHANGES \
LICENSE \
README.rst
SOURCE_FILES = \
src/picohttpparser/picohttpparser.c \
src/reactor/data.c \
src/reactor/pointer.c \
src/reactor/string.c \
src/reactor/list.c \
src/reactor/buffer.c \
src/reactor/vector.c \
src/reactor/hash.c \
src/reactor/map.c \
src/reactor/mapi.c \
src/reactor/maps.c \
src/reactor/utility.c \
src/reactor/core.c \
src/reactor/descriptor.c \
src/reactor/event.c \
src/reactor/stream.c \
src/reactor/timer.c \
src/reactor/notify.c \
src/reactor/http.c \
src/reactor/net.c \
src/reactor/server.c \
src/reactor/async.c \
src/reactor/resolver.c
HEADER_FILES = \
src/picohttpparser/picohttpparser.h \
src/reactor/data.h \
src/reactor/pointer.h \
src/reactor/string.h\
src/reactor/list.h \
src/reactor/buffer.h \
src/reactor/vector.h \
src/reactor/hash.h \
src/reactor/map.h \
src/reactor/mapi.h \
src/reactor/maps.h \
src/reactor/utility.h \
src/reactor/core.h \
src/reactor/descriptor.h \
src/reactor/event.h \
src/reactor/stream.h \
src/reactor/timer.h \
src/reactor/notify.h \
src/reactor/http.h \
src/reactor/net.h \
src/reactor/server.h \
src/reactor/async.h \
src/reactor/resolver.h
lib_LTLIBRARIES = libreactor.la
libreactor_la_SOURCES = $(SOURCE_FILES) $(HEADER_FILES)
libreactor_la_CFLAGS = -std=gnu2x -g -O3 -flto -march=native -I$(srcdir)/src -fPIC
libreactor_la_LDFLAGS = -static
headerfilesdir = $(includedir)/reactor
headerfiles_HEADERS = $(HEADER_FILES)
mainheaderdir = $(includedir)
mainheader_HEADERS = src/reactor.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libreactor.pc
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in libreactor-?.?.?.tar.gz
CLEANFILES = {.,test/,src/reactor/,src/picohttpparser}/*.{gcno,gcda,gcov}
maintainer-clean-local:
rm -rf autotools m4 libreactor-?.?.?
indent:
clang-format -i src/reactor/*.c test/*.c
### unit testing ###
AM_CFLAGS = -std=gnu2x -mno-sse -O0 -g -ftest-coverage -fprofile-arcs -I$(srcdir)/src -DGCOV_BUILD -DUNIT_TESTING -DDATADIR=\"$(srcdir)/\"
LDADD = -L. libreactor_test.a -lcmocka
check_LIBRARIES = libreactor_test.a
libreactor_test_a_SOURCES = $(SOURCE_FILES) $(HEADER_FILES)
libreactor_test_a_CFLAGS = -$(AM_CFLAGS)
check_PROGRAMS = \
test/data \
test/pointer \
test/string \
test/list \
test/buffer \
test/vector \
test/hash \
test/map \
test/mapi \
test/maps \
test/utility \
test/core \
test/descriptor \
test/event \
test/stream \
test/timer \
test/notify \
test/http \
test/net \
test/server \
test/async \
test/resolver
test_core_SOURCES = test/core.c test/mock.c
test_core_LDFLAGS = -Wl,--wrap=epoll_wait
test_stream_LDADD = $(LDADD) -lssl -lcrypto
test_http_LDADD = $(LDADD) -lssl -lcrypto
test_net_LDADD = $(LDADD) -lssl -lcrypto
test_server_LDADD = $(LDADD) -lssl -lcrypto
test_async_LDFLAGS = -pthread
test_resolver_LDADD = $(LDADD) -lssl -lcrypto
test_resolver_LDFLAGS = -pthread
dist_noinst_SCRIPTS = test/valgrind.sh test/coverage.sh
dist_noinst_DATA = test/files/cert.pem test/files/key.pem
TESTS = $(check_PROGRAMS) test/valgrind.sh test/coverage.sh