1 # Makefile.am for libevent
2 # Copyright 2000-2007 Niels Provos
3 # Copyright 2007-2012 Niels Provos and Nick Mathewson
5 # See LICENSE for copying information.
7 ACLOCAL_AMFLAGS = -I m4
9 # This is the "Release" of the Libevent ABI. It takes precedence over
10 # the VERSION_INFO, so that two versions of Libevent with the same
11 # "Release" are never binary-compatible.
13 # This number incremented once for the 2.0 release candidate, and
14 # will increment for each series until we revise our interfaces enough
15 # that we can seriously expect ABI compatibility between series.
17 RELEASE = -release 2.2
19 # This is the version info for the libevent binary API. It has three
21 # Current -- the number of the binary API that we're implementing
22 # Revision -- which iteration of the implementation of the binary
23 # API are we supplying?
24 # Age -- How many previous binary API versions do we also
27 # To increment a VERSION_INFO (current:revision:age):
28 # If the ABI didn't change:
29 # Return (current:revision+1:age)
30 # If the ABI changed, but it's backward-compatible:
31 # Return (current+1:0:age+1)
32 # If the ABI changed and it isn't backward-compatible:
33 # Return (current+1:0:0)
35 # Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
36 # UNLESS YOU REALLY REALLY HAVE TO.
39 # History: RELEASE VERSION_INFO
40 # 2.0.1-alpha -- 2.0 1:0:0
41 # 2.0.2-alpha -- 2:0:0
42 # 2.0.3-alpha -- 2:0:0 (should have incremented; didn't.)
43 # 2.0.4-alpha -- 3:0:0
45 # 2.0.6-rc -- 2.0 2:0:0
46 # 2.0.7-rc -- 2.0 3:0:1
47 # 2.0.8-rc -- 2.0 4:0:2
48 # 2.0.9-rc -- 2.0 5:0:0 (ABI changed slightly)
49 # 2.0.10-stable-- 2.0 5:1:0 (No ABI change)
50 # 2.0.11-stable-- 2.0 6:0:1 (ABI changed, backward-compatible)
51 # 2.0.12-stable-- 2.0 6:1:1 (No ABI change)
52 # 2.0.13-stable-- 2.0 6:2:1 (No ABI change)
53 # 2.0.14-stable-- 2.0 6:3:1 (No ABI change)
54 # 2.0.15-stable-- 2.0 6:3:1 (Forgot to update :( )
55 # 2.0.16-stable-- 2.0 6:4:1 (No ABI change)
56 # 2.0.17-stable-- 2.0 6:5:1 (No ABI change)
57 # 2.0.18-stable-- 2.0 6:6:1 (No ABI change)
58 # 2.0.19-stable-- 2.0 6:7:1 (No ABI change)
59 # 2.0.20-stable-- 2.0 6:8:1 (No ABI change)
60 # 2.0.21-stable-- 2.0 6:9:1 (No ABI change)
63 # 2.1.1-alpha -- 2.1 1:0:0
64 # 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
65 # 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
66 # 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
67 # 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
68 # 2.1.6-beta -- 2.1 6:0:0 (ABI changed slightly)
69 # 2.1.7-beta -- 2.1 6:1:0 (ABI changed slightly)
70 # 2.1.8-stable-- 2.1 6:2:0 (ABI changed slightly)
73 # 2.2.0-alpha -- 2.2 1:0:0
75 # ABI version history for this package effectively restarts every time
76 # we change RELEASE. Version 1.4.x had RELEASE of 1.4.
78 # Ideally, we would not be using RELEASE at all; instead we could just
79 # use the VERSION_INFO field to label our backward-incompatible ABI
80 # changes, and those would be few and far between. Unfortunately,
81 # Libevent still exposes far too many volatile structures in its
82 # headers, so we pretty much have to assume that most development
83 # series will break ABI compatibility. For now, it's simplest just to
84 # keep incrementing the RELEASE between series and resetting VERSION_INFO.
86 # Eventually, when we get to the point where the structures in the
87 # headers are all non-changing (or not there at all!), we can shift to
88 # a more normal worldview where backward-incompatible ABI changes are
89 # nice and rare. For the next couple of years, though, 'struct event'
90 # is user-visible, and so we can pretty much guarantee that release
91 # series won't be binary-compatible.
94 dist_bin_SCRIPTS = event_rpcgen.py
97 pkgconfigdir=$(libdir)/pkgconfig
98 LIBEVENT_PKGCONFIG=libevent.pc libevent_core.pc libevent_extra.pc
100 # These sources are conditionally added by configure.ac or conditionally
101 # included from other files.
102 PLATFORM_DEPENDENT_SRC = \
109 cmake/AddCompilerFlags.cmake \
110 cmake/AddEventLibrary.cmake \
111 cmake/CheckConstExists.cmake \
112 cmake/CheckFileOffsetBits.c \
113 cmake/CheckFileOffsetBits.cmake \
114 cmake/CheckFunctionKeywords.cmake \
115 cmake/CheckPrototypeDefinition.c.in \
116 cmake/CheckPrototypeDefinition.cmake \
117 cmake/CheckWorkingKqueue.cmake \
118 cmake/CodeCoverage.cmake \
119 cmake/COPYING-CMAKE-SCRIPTS \
120 cmake/Copyright.txt \
121 cmake/FindMbedTLS.cmake \
122 cmake/LibeventConfig.cmake.in \
123 cmake/LibeventConfigVersion.cmake.in \
125 cmake/Uninstall.cmake.in \
126 cmake/UseDoxygen.cmake \
127 cmake/VersionViaGit.cmake \
128 event-config.h.cmake \
129 evconfig-private.h.cmake \
132 DOCUMENTATION_FILES = \
133 Documentation/Building.md
143 make-event-config.sed \
148 $(DOCUMENTATION_FILES) \
149 $(PLATFORM_DEPENDENT_SRC)
151 LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
153 LIBEVENT_LIBS_LA += libevent_pthreads.la
154 LIBEVENT_PKGCONFIG += libevent_pthreads.pc
157 LIBEVENT_LIBS_LA += libevent_openssl.la
158 LIBEVENT_PKGCONFIG += libevent_openssl.pc
161 LIBEVENT_LIBS_LA += libevent_mbedtls.la
162 LIBEVENT_PKGCONFIG += libevent_mbedtls.pc
166 lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
167 pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
169 noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
179 include include/include.am
180 include sample/include.am
181 include test/include.am
185 SYS_CORE_LIBS = -liphlpapi
186 SYS_LIBS = -lws2_32 -lshell32 -ladvapi32 -lbcrypt
187 SYS_SRC = win32select.c buffer_iocp.c event_iocp.c \
189 SYS_INCLUDES = -IWIN32-Code
192 SYS_SRC += evthread_win32.c
233 BUILT_SOURCES += include/event2/event-config.h
235 include/event2/event-config.h: config.h make-event-config.sed
236 $(AM_V_GEN)test -d include/event2 || $(MKDIR_P) include/event2
237 $(AM_V_at)$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T
238 $(AM_V_at)mv -f $@T $@
243 bufferevent_filter.c \
245 bufferevent_ratelim.c \
266 if BUILD_WITH_NO_UNDEFINED
267 NO_UNDEFINED = -no-undefined
268 MAYBE_CORE = libevent_core.la
274 AM_CFLAGS = $(LIBEVENT_CFLAGS)
275 AM_CPPFLAGS = -I$(srcdir)/compat -I./include -I$(srcdir)/include $(SYS_INCLUDES) $(LIBEVENT_CPPFLAGS)
276 AM_LDFLAGS = $(LIBEVENT_LDFLAGS)
278 GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED) $(AM_LDFLAGS)
280 libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
281 libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) $(SYS_CORE_LIBS)
282 libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
284 libevent_core_la_SOURCES = $(CORE_SRC)
285 libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) $(SYS_CORE_LIBS)
286 libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
289 libevent_pthreads_la_SOURCES = evthread_pthread.c
290 libevent_pthreads_la_LIBADD = $(MAYBE_CORE)
291 libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS)
294 libevent_extra_la_SOURCES = $(EXTRAS_SRC)
295 libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS)
296 libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS)
299 libevent_openssl_la_SOURCES = bufferevent_openssl.c bufferevent_ssl.c
300 libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS)
301 libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
302 libevent_openssl_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
306 libevent_mbedtls_la_SOURCES = bufferevent_mbedtls.c bufferevent_ssl.c
307 libevent_mbedtls_la_LIBADD = $(MAYBE_CORE) $(MBEDTLS_LIBS)
308 libevent_mbedtls_la_LDFLAGS = $(GENERIC_LDFLAGS)
309 libevent_mbedtls_la_CPPFLAGS = $(AM_CPPFLAGS) $(MBEDTLS_INCS)
313 WIN32-Code/getopt.h \
314 WIN32-Code/getopt.c \
315 WIN32-Code/getopt_long.c \
317 bufferevent-internal.h \
318 changelist-internal.h \
321 epolltable-internal.h \
322 evbuffer-internal.h \
326 evsignal-internal.h \
327 evthread-internal.h \
355 include_HEADERS = $(EVENT1_HDRS)
357 noinst_HEADERS += $(EVENT1_HDRS)
364 DISTCLEANFILES += *~ libevent.pc libevent_core.pc libevent_extra.pc ./include/event2/event-config.h