-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.am
251 lines (196 loc) · 7.58 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# Copyright (c) 2013 Luca Barbato
# Copyright 2016 Garrett D'Amore <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = @DOLT_CLEANFILES@
EXTRA_DIST =
################################################################################
# fsocket library #
################################################################################
fsockincludedir = $(includedir)/fsocket
fsockinclude_HEADERS = \
src/fsock.h \
src/utils/queue.h
lib_LTLIBRARIES = libfsocket.la
FSOCK_CORE = \
src/core/global.h \
src/core/global.c \
src/core/sock.h \
src/core/sock.c
FSOCK_UTILS = \
src/utils/anet.h \
src/utils/anet.c \
src/utils/efd.h \
src/utils/efd.c \
src/utils/glock.h \
src/utils/glock.c \
src/utils/mutex.h \
src/utils/mutex.c \
src/utils/parr.h \
src/utils/parr.c \
src/utils/queue.h \
src/utils/queue.c \
src/utils/thread.h \
src/utils/thread.c
libfsocket_la_SOURCES = \
$(FSOCK_CORE) \
$(FSOCK_UTILS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libfsocket.pc
libfsocket_la_LDFLAGS = -no-undefined -version-info @FSOCK_LIBTOOL_VERSION@
libfsocket_la_CFLAGS = -DFSOCK_EXPORTS
################################################################################
# documentation #
################################################################################
# Source files.
MAN7 = \
doc/fsocket.txt
MAN3 = \
doc/fsock_socket.txt
MAN1 = \
doc/fcat.txt
if DOC
# Build instructions.
SUFFIXES = .1 .3 .7 .1.html .3.html .7.html
.txt.1:
$(AM_V_GEN)$(ASCIIDOCTOR) -b manpage -D doc \
-amanmanual="fsocket @FSOCK_PACKAGE_VERSION@" $<
.txt.3:
$(AM_V_GEN)$(ASCIIDOCTOR) -b manpage -D doc \
-amanmanual="fsocket @FSOCK_PACKAGE_VERSION@" $<
.txt.7:
$(AM_V_GEN)$(ASCIIDOCTOR) -b manpage -D doc \
-amanmanual="fsocket @FSOCK_PACKAGE_VERSION@" $<
.txt.1.html:
$(AM_V_GEN)$(ASCIIDOCTOR) -d manpage -b html5 \
-a stylesheet=$(abs_srcdir)/doc/stylesheet.css -atoc=left \
-a version-label=$(PACKAGE) -a revnumber=$(PACKAGE_VERSION) \
-o $@ $<
.txt.3.html:
$(AM_V_GEN)$(ASCIIDOCTOR) -d manpage -b html5 \
-a stylesheet=$(abs_srcdir)/doc/stylesheet.css -atoc=left \
-a version-label=$(PACKAGE) -a revnumber=$(PACKAGE_VERSION) \
-o $@ $<
.txt.7.html:
$(AM_V_GEN)$(ASCIIDOCTOR) -d manpage -b html5 \
-a stylesheet=$(abs_srcdir)/doc/stylesheet.css -atoc=left \
-a version-label=$(PACKAGE) -a revnumber=$(PACKAGE_VERSION) \
-o $@ $<
# Cause man pages to be generated and installed.
dist_man1_MANS = $(MAN1:%.txt=%.1)
dist_man3_MANS = $(MAN3:%.txt=%.3)
dist_man7_MANS = $(MAN7:%.txt=%.7)
# Cause HTML docs to be generated.
html_DATA = $(MAN1:%.txt=%.1.html) $(MAN3:%.txt=%.3.html) $(MAN7:%.txt=%.7.html)
# Extra files to be cleaned.
CLEANFILES = $(MAN1:%.txt=%.1) $(MAN3:%.txt=%.3) $(MAN7:%.txt=%.7) \
$(MAN1:%.txt=%.1.html) $(MAN3:%.txt=%.3.html) $(MAN7:%.txt=%.7.html)
endif
# Extra files to be included into the source package.
EXTRA_DIST += doc/stylesheet.css $(MAN1) $(MAN3) $(MAN7)
################################################################################
# performance tests and examples #
################################################################################
noinst_PROGRAMS = \
perf/perf_ex \
perf/perf_thr \
perf/local_thr \
perf/remote_thr \
perf/local_lat \
perf/remote_lat \
perf/perf_pubsub \
example/example
LDFLAGS += -lframer -lnanomsg -lev
LDADD = libfsocket.la
################################################################################
# automated tests #
################################################################################
FEATURE_TESTS = \
tests/feature1
EXTRA_DIST += tests/testutil.h
check_PROGRAMS = \
$(FEATURE_TESTS)
TESTS = $(check_PROGRAMS)
################################################################################
# tools #
################################################################################
bin_PROGRAMS =
fcat_SOURCES = \
tools/fcat.c
if FCAT
bin_PROGRAMS += fcat
endif #FCAT
################################################################################
# RFCs #
################################################################################
EXTRA_DIST += \
./rfc/sp-protocol-ids-01.txt \
./rfc/sp-tcp-mapping-01.txt \
./rfc/sp-udp-mapping-01.txt \
./rfc/sp-tls-mapping-01.txt \
./rfc/sp-request-reply-01.txt
################################################################################
# additional packaging-related stuff #
################################################################################
# Generate ChangeLog file from git.
# Also, there's no git availabe when building from the source package and
# thus no way to obtain package version. Therefore, package version is
# saved into a file when building a source package.
dist-hook:
$(srcdir)/package_version.sh > $(distdir)/.version
if FCAT
if SYMLINKS
install-exec-hook:
cd $(DESTDIR)$(bindir) && \
$(LN_S) -f nanocat nn_push$(EXEEXT) && \
$(LN_S) -f nanocat nn_pull$(EXEEXT) && \
$(LN_S) -f nanocat nn_pub$(EXEEXT) && \
$(LN_S) -f nanocat nn_sub$(EXEEXT) && \
$(LN_S) -f nanocat nn_req$(EXEEXT) && \
$(LN_S) -f nanocat nn_rep$(EXEEXT) && \
$(LN_S) -f nanocat nn_surveyor$(EXEEXT) && \
$(LN_S) -f nanocat nn_respondent$(EXEEXT) && \
$(LN_S) -f nanocat nn_bus$(EXEEXT) && \
$(LN_S) -f nanocat nn_pair$(EXEEXT)
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
rm -f nn_push$(EXEEXT) ; \
rm -f nn_pull$(EXEEXT) ; \
rm -f nn_pub$(EXEEXT) ; \
rm -f nn_sub$(EXEEXT) ; \
rm -f nn_req$(EXEEXT) ; \
rm -f nn_rep$(EXEEXT) ; \
rm -f nn_surveyor$(EXEEXT) ; \
rm -f nn_respondent$(EXEEXT) ; \
rm -f nn_bus$(EXEEXT) ; \
rm -f nn_pair$(EXEEXT)
cd $(DESTDIR)$(libdir) && \
rm -f libfsocket.*
cd $(DESTDIR)$(includedir) && \
rm -rf fsocket
endif #SYMLINKS
endif #FCAT
EXTRA_DIST += \
./abi_version.sh \
./package_version.sh \
./src/CMakeLists.txt \
./CMakeLists.txt
clean-local:
-rm -f test.ipc test-shutdown.ipc test-separation.ipc test-stress.ipc