1
1
AUTOMAKE_OPTIONS = subdir-objects
2
2
3
- ACLOCAL_AMFLAGS = -I m4
4
- AM_CFLAGS = -std=gnu11 -flto -fuse-linker-plugin -I$(srcdir ) /src
3
+ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4
+ AM_CFLAGS = -std=gnu11 -g -O3 -flto -I$(srcdir ) /src
5
+ AM_LDFLAGS = -static -pthread
5
6
6
7
SOURCE_FILES = \
7
- src/picohttpparser/picohttpparser.c \
8
- src/reactor/reactor.c \
9
- src/reactor/reactor_assert.c \
10
- src/reactor/reactor_vector.c \
11
- src/reactor/reactor_utility.c \
12
- src/reactor/reactor_user.c \
13
- src/reactor/reactor_core.c \
14
- src/reactor/reactor_stats.c \
15
- src/reactor/reactor_fd.c \
16
- src/reactor/reactor_timer.c \
17
- src/reactor/reactor_pool.c \
18
- src/reactor/reactor_resolver.c \
19
- src/reactor/reactor_net.c \
20
- src/reactor/reactor_stream.c \
21
- src/reactor/reactor_http.c \
22
- src/reactor/reactor_couch.c \
23
- src/reactor/reactor_server.c
8
+ src/notify/notify.c
24
9
25
10
HEADER_FILES = \
26
- src/picohttpparser/picohttpparser.h \
27
- src/reactor/reactor.h \
28
- src/reactor/reactor_assert.h \
29
- src/reactor/reactor_vector.h \
30
- src/reactor/reactor_utility.h \
31
- src/reactor/reactor_user.h \
32
- src/reactor/reactor_core.h \
33
- src/reactor/reactor_stats.h \
34
- src/reactor/reactor_fd.h \
35
- src/reactor/reactor_timer.h \
36
- src/reactor/reactor_pool.h \
37
- src/reactor/reactor_resolver.h \
38
- src/reactor/reactor_net.h \
39
- src/reactor/reactor_stream.h \
40
- src/reactor/reactor_http.h \
41
- src/reactor/reactor_couch.h \
42
- src/reactor/reactor_server.h
11
+ src/reactor.h \
12
+ src/notify/notify.h
43
13
44
14
lib_LTLIBRARIES = libreactor.la
45
15
libreactor_la_SOURCES = $(SOURCE_FILES ) $(HEADER_FILES )
@@ -55,46 +25,10 @@ pkgconfigdir = $(libdir)/pkgconfig
55
25
pkgconfig_DATA = libreactor.pc
56
26
57
27
bin_PROGRAMS = \
58
- example/example \
59
- example/producer \
60
- example/resolver \
61
- example/tcp \
62
- example/tcpd \
63
- example/http \
64
- example/couch \
65
- example/httpd \
66
- example/server \
67
- example/hello
28
+ example/notify
68
29
69
- example_example_LDFLAGS = -pthread
70
- example_example_LDADD = libreactor.la -ldynamic
71
-
72
- example_producer_LDFLAGS = -pthread
73
- example_producer_LDADD = libreactor.la -ldynamic
74
-
75
- example_resolver_LDFLAGS = -pthread
76
- example_resolver_LDADD = libreactor.la -ldynamic
77
-
78
- example_tcp_LDFLAGS = -pthread
79
- example_tcp_LDADD = libreactor.la -ldynamic
80
-
81
- example_tcpd_LDFLAGS = -pthread
82
- example_tcpd_LDADD = libreactor.la -ldynamic
83
-
84
- example_http_LDFLAGS = -pthread
85
- example_http_LDADD = libreactor.la -ldynamic
86
-
87
- example_httpd_LDFLAGS = -pthread
88
- example_httpd_LDADD = libreactor.la -ldynamic
89
-
90
- example_couch_LDFLAGS = -pthread
91
- example_couch_LDADD = libreactor.la -ldynamic -ljansson
92
-
93
- example_server_LDFLAGS = -pthread
94
- example_server_LDADD = libreactor.la -ldynamic -ljansson
95
-
96
- example_hello_LDFLAGS = -pthread
97
- example_hello_LDADD = libreactor.la -ldynamic -ljansson
30
+ example_notify_LDFLAGS = -pthread
31
+ example_notify_LDADD = libreactor.la -ldynamic
98
32
99
33
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in libreactor-?.?.?.tar.gz
100
34
@@ -105,45 +39,24 @@ CLEANFILES = {.,test/,src/reactor/,src/picohttpparser}/*.{gcno,gcda,gcov}
105
39
106
40
# ## unit tests ###
107
41
108
- CHECK_CFLAGS = -std=gnu11 -O0 -g -ftest-coverage -fprofile-arcs -I$(srcdir ) /src -DGCOV_BUILD
109
- CHECK_LDADD = -L. libreactor_test.a -lcmocka -ldynamic
110
- CHECK_LDFLAGS_EXTRA = -pthread -Wl,--wrap=abort
111
-
112
42
check_LIBRARIES = libreactor_test.a
113
43
libreactor_test_a_CFLAGS = $(CHECK_CFLAGS )
114
44
libreactor_test_a_SOURCES = $(SOURCE_FILES ) $(HEADER_FILES )
115
45
46
+ CHECK_CFLAGS = -std=gnu11 -O0 -g -ftest-coverage -fprofile-arcs -I$(srcdir ) /src -DGCOV_BUILD
47
+ CHECK_LDADD = -L. libreactor_test.a -lcmocka -ldynamic
48
+ CHECK_LDFLAGS_EXTRA = -pthread \
49
+ -Wl,--wrap=abort \
50
+ -Wl,--wrap=read \
51
+ -Wl,--wrap=inotify_init1
52
+
116
53
check_PROGRAMS =
117
54
118
- check_PROGRAMS += test/reactor
119
- test_reactor_CFLAGS = $(CHECK_CFLAGS )
120
- test_reactor_LDADD = $(CHECK_LDADD )
121
- test_reactor_LDFLAGS = $(CHECK_LDFLAGS_EXTRA )
122
- test_reactor_SOURCES = test/reactor.c test/mock.c
123
-
124
- check_PROGRAMS += test/reactor_assert
125
- test_reactor_assert_CFLAGS = $(CHECK_CFLAGS )
126
- test_reactor_assert_LDADD = $(CHECK_LDADD )
127
- test_reactor_assert_LDFLAGS = $(CHECK_LDFLAGS_EXTRA )
128
- test_reactor_assert_SOURCES = test/reactor_assert.c test/mock.c
129
-
130
- check_PROGRAMS += test/reactor_core
131
- test_reactor_core_CFLAGS = $(CHECK_CFLAGS )
132
- test_reactor_core_LDADD = $(CHECK_LDADD )
133
- test_reactor_core_LDFLAGS = $(CHECK_LDFLAGS_EXTRA )
134
- test_reactor_core_SOURCES = test/reactor_core.c test/mock.c
135
-
136
- check_PROGRAMS += test/reactor_pool
137
- test_reactor_pool_CFLAGS = $(CHECK_CFLAGS )
138
- test_reactor_pool_LDADD = $(CHECK_LDADD )
139
- test_reactor_pool_LDFLAGS = $(CHECK_LDFLAGS_EXTRA )
140
- test_reactor_pool_SOURCES = test/reactor_pool.c test/mock.c
141
-
142
- check_PROGRAMS += test/reactor_resolver
143
- test_reactor_resolver_CFLAGS = $(CHECK_CFLAGS )
144
- test_reactor_resolver_LDADD = $(CHECK_LDADD )
145
- test_reactor_resolver_LDFLAGS = $(CHECK_LDFLAGS_EXTRA )
146
- test_reactor_resolver_SOURCES = test/reactor_resolver.c test/mock.c
55
+ check_PROGRAMS += test/notify
56
+ test_notify_CFLAGS = $(CHECK_CFLAGS )
57
+ test_notify_LDADD = $(CHECK_LDADD )
58
+ test_notify_LDFLAGS = $(CHECK_LDFLAGS_EXTRA )
59
+ test_notify_SOURCES = test/notify.c test/mock.c
147
60
148
61
dist_noinst_SCRIPTS = test/valgrind.sh test/coverage.sh Dockerfile
149
62
0 commit comments