1# Makefile.am for libevent 2# Copyright 2000-2007 Niels Provos 3# Copyright 2007-2012 Niels Provos and Nick Mathewson 4# 5# See LICENSE for copying information. 6 7# 'foreign' means that we're not enforcing GNU package rules strictly. 8# '1.9' means that we need automake 1.9 or later (and we do). 9AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects 10 11ACLOCAL_AMFLAGS = -I m4 12 13# This is the "Release" of the Libevent ABI. It takes precedence over 14# the VERSION_INFO, so that two versions of Libevent with the same 15# "Release" are never binary-compatible. 16# 17# This number incremented once for the 2.0 release candidate, and 18# will increment for each series until we revise our interfaces enough 19# that we can seriously expect ABI compatibility between series. 20# 21RELEASE = -release 2.1 22 23# This is the version info for the libevent binary API. It has three 24# numbers: 25# Current -- the number of the binary API that we're implementing 26# Revision -- which iteration of the implementation of the binary 27# API are we supplying? 28# Age -- How many previous binary API versions do we also 29# support? 30# 31# To increment a VERSION_INFO (current:revision:age): 32# If the ABI didn't change: 33# Return (current:revision+1:age) 34# If the ABI changed, but it's backward-compatible: 35# Return (current+1:0:age+1) 36# If the ABI changed and it isn't backward-compatible: 37# Return (current+1:0:0) 38# 39# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES 40# UNLESS YOU REALLY REALLY HAVE TO. 41VERSION_INFO = 1:0:0 42 43# History: RELEASE VERSION_INFO 44# 2.0.1-alpha -- 2.0 1:0:0 45# 2.0.2-alpha -- 2:0:0 46# 2.0.3-alpha -- 2:0:0 (should have incremented; didn't.) 47# 2.0.4-alpha -- 3:0:0 48# 2.0.5-beta -- 4:0:0 49# 2.0.6-rc -- 2.0 2:0:0 50# 2.0.7-rc -- 2.0 3:0:1 51# 2.0.8-rc -- 2.0 4:0:2 52# 2.0.9-rc -- 2.0 5:0:0 (ABI changed slightly) 53# 2.0.10-stable-- 2.0 5:1:0 (No ABI change) 54# 2.0.11-stable-- 2.0 6:0:1 (ABI changed, backward-compatible) 55# 2.0.12-stable-- 2.0 6:1:1 (No ABI change) 56# 2.0.13-stable-- 2.0 6:2:1 (No ABI change) 57# 2.0.14-stable-- 2.0 6:3:1 (No ABI change) 58# 2.0.15-stable-- 2.0 6:3:1 (Forgot to update :( ) 59# 2.0.16-stable-- 2.0 6:4:1 (No ABI change) 60# 2.0.17-stable-- 2.0 6:5:1 (No ABI change) 61# 2.0.18-stable-- 2.0 6:6:1 (No ABI change) 62# 2.0.19-stable-- 2.0 6:7:1 (No ABI change) 63# 2.0.20-stable-- 2.0 6:8:1 (No ABI change) 64# 2.0.21-stable-- 2.0 6:9:1 (No ABI change) 65# 66# For Libevent 2.1: 67# 2.1.1-alpha -- 2.1 1:0:0 68# 2.1.2-alpha-- 2.2 2:0:1 (Backward-compatible) 69 70 71# ABI version history for this package effectively restarts every time 72# we change RELEASE. Version 1.4.x had RELEASE of 1.4. 73# 74# Ideally, we would not be using RELEASE at all; instead we could just 75# use the VERSION_INFO field to label our backward-incompatible ABI 76# changes, and those would be few and far between. Unfortunately, 77# Libevent still exposes far too many volatile structures in its 78# headers, so we pretty much have to assume that most development 79# series will break ABI compatibility. For now, it's simplest just to 80# keep incrementing the RELEASE between series and resetting VERSION_INFO. 81# 82# Eventually, when we get to the point where the structures in the 83# headers are all non-changing (or not there at all!), we can shift to 84# a more normal worldview where backward-incompatible ABI changes are 85# nice and rare. For the next couple of years, though, 'struct event' 86# is user-visible, and so we can pretty much guarantee that release 87# series won't be binary-compatible. 88 89if INSTALL_LIBEVENT 90dist_bin_SCRIPTS = event_rpcgen.py 91endif 92 93pkgconfigdir=$(libdir)/pkgconfig 94LIBEVENT_PKGCONFIG=libevent.pc 95 96# These sources are conditionally added by configure.ac or conditionally 97# included from other files. 98PLATFORM_DEPENDENT_SRC = \ 99 arc4random.c \ 100 epoll_sub.c 101 102EXTRA_DIST = \ 103 ChangeLog-1.4 \ 104 ChangeLog-2.0 \ 105 Doxyfile \ 106 LICENSE \ 107 Makefile.nmake test/Makefile.nmake \ 108 autogen.sh \ 109 event_rpcgen.py \ 110 libevent.pc.in \ 111 make-event-config.sed \ 112 whatsnew-2.0.txt \ 113 whatsnew-2.1.txt \ 114 $(PLATFORM_DEPENDENT_SRC) 115 116LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la 117if PTHREADS 118LIBEVENT_LIBS_LA += libevent_pthreads.la 119LIBEVENT_PKGCONFIG += libevent_pthreads.pc 120endif 121if OPENSSL 122LIBEVENT_LIBS_LA += libevent_openssl.la 123LIBEVENT_PKGCONFIG += libevent_openssl.pc 124endif 125 126if INSTALL_LIBEVENT 127lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA) 128pkgconfig_DATA = $(LIBEVENT_PKGCONFIG) 129else 130noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA) 131endif 132 133EXTRA_SOURCE= 134noinst_HEADERS= 135noinst_PROGRAMS= 136EXTRA_PROGRAMS= 137CLEANFILES= 138DISTCLEANFILES= 139BUILT_SOURCES = 140include include/include.am 141include sample/include.am 142include test/include.am 143 144if BUILD_WIN32 145 146SYS_LIBS = -lws2_32 -lshell32 -ladvapi32 147SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \ 148 bufferevent_async.c 149SYS_INCLUDES = -IWIN32-Code 150 151else 152 153SYS_LIBS = 154SYS_SRC = 155SYS_INCLUDES = 156 157endif 158 159if SELECT_BACKEND 160SYS_SRC += select.c 161endif 162if POLL_BACKEND 163SYS_SRC += poll.c 164endif 165if DEVPOLL_BACKEND 166SYS_SRC += devpoll.c 167endif 168if KQUEUE_BACKEND 169SYS_SRC += kqueue.c 170endif 171if EPOLL_BACKEND 172SYS_SRC += epoll.c 173endif 174if EVPORT_BACKEND 175SYS_SRC += evport.c 176endif 177if SIGNAL_SUPPORT 178SYS_SRC += signal.c 179endif 180 181BUILT_SOURCES += include/event2/event-config.h 182 183include/event2/event-config.h: config.h make-event-config.sed 184 $(AM_V_GEN)test -d include/event2 || $(MKDIR_P) include/event2 185 $(AM_V_at)$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T 186 $(AM_V_at)mv -f $@T $@ 187 188CORE_SRC = \ 189 buffer.c \ 190 bufferevent.c \ 191 bufferevent_filter.c \ 192 bufferevent_pair.c \ 193 bufferevent_ratelim.c \ 194 bufferevent_sock.c \ 195 event.c \ 196 evmap.c \ 197 evthread.c \ 198 evutil.c \ 199 evutil_rand.c \ 200 evutil_time.c \ 201 listener.c \ 202 log.c \ 203 strlcpy.c \ 204 $(SYS_SRC) 205 206EXTRAS_SRC = \ 207 evdns.c \ 208 event_tagging.c \ 209 evrpc.c \ 210 http.c 211 212if BUILD_WITH_NO_UNDEFINED 213NO_UNDEFINED = -no-undefined 214MAYBE_CORE = libevent_core.la 215else 216NO_UNDEFINED = 217MAYBE_CORE = 218endif 219 220GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED) 221 222libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC) 223libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) 224libevent_la_LDFLAGS = $(GENERIC_LDFLAGS) 225 226libevent_core_la_SOURCES = $(CORE_SRC) 227libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) 228libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS) 229 230if PTHREADS 231libevent_pthreads_la_SOURCES = evthread_pthread.c 232libevent_pthreads_la_LIBADD = $(MAYBE_CORE) 233libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS) 234endif 235 236libevent_extra_la_SOURCES = $(EXTRAS_SRC) 237libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS) 238libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS) 239 240if OPENSSL 241libevent_openssl_la_SOURCES = bufferevent_openssl.c 242libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS) 243libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS) 244libevent_openssl_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS) 245endif 246 247noinst_HEADERS += \ 248 WIN32-Code/evconfig-private.h \ 249 WIN32-Code/event2/event-config.h \ 250 WIN32-Code/tree.h \ 251 bufferevent-internal.h \ 252 changelist-internal.h \ 253 compat/sys/queue.h \ 254 defer-internal.h \ 255 evbuffer-internal.h \ 256 evconfig-private.h \ 257 event-internal.h \ 258 evmap-internal.h \ 259 evrpc-internal.h \ 260 evsignal-internal.h \ 261 evthread-internal.h \ 262 ht-internal.h \ 263 http-internal.h \ 264 iocp-internal.h \ 265 ipv6-internal.h \ 266 kqueue-internal.h \ 267 log-internal.h \ 268 minheap-internal.h \ 269 mm-internal.h \ 270 ratelim-internal.h \ 271 ratelim-internal.h \ 272 strlcpy-internal.h \ 273 time-internal.h \ 274 util-internal.h 275 276EVENT1_HDRS = \ 277 include/evdns.h \ 278 include/event.h \ 279 include/evhttp.h \ 280 include/evrpc.h \ 281 include/evutil.h 282 283if INSTALL_LIBEVENT 284include_HEADERS = $(EVENT1_HDRS) 285else 286noinst_HEADERS += $(EVENT1_HDRS) 287endif 288 289AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES) 290 291verify: check 292 293doxygen: FORCE 294 doxygen $(srcdir)/Doxyfile 295FORCE: 296 297DISTCLEANFILES += *~ libevent.pc ./include/event2/event-config.h 298 299