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.7' means that we need automake 1.7 or later (and we do). 9AUTOMAKE_OPTIONS = foreign 1.7 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.0 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 = 6:6:1 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# 63# For Libevent 2.1: 64# 2.1.1-alpha -- 2.1 1:0:0 65 66 67# ABI version history for this package effectively restarts every time 68# we change RELEASE. Version 1.4.x had RELEASE of 1.4. 69# 70# Ideally, we would not be using RELEASE at all; instead we could just 71# use the VERSION_INFO field to label our backward-incompatible ABI 72# changes, and those would be few and far between. Unfortunately, 73# Libevent still exposes far too many volatile structures in its 74# headers, so we pretty much have to assume that most development 75# series will break ABI compatibility. For now, it's simplest just to 76# keep incrementing the RELEASE between series and resetting VERSION_INFO. 77# 78# Eventually, when we get to the point where the structures in the 79# headers are all non-changing (or not there at all!), we can shift to 80# a more normal worldview where backward-incompatible ABI changes are 81# nice and rare. For the next couple of years, though, 'struct event' 82# is user-visible, and so we can pretty much guarantee that release 83# series won't be binary-compatible. 84 85if INSTALL_LIBEVENT 86dist_bin_SCRIPTS = event_rpcgen.py 87endif 88 89# These sources are conditionally added by configure.in or conditionally 90# included from other files. 91PLATFORM_DEPENDENT_SRC = \ 92 epoll_sub.c \ 93 arc4random.c 94 95EXTRA_DIST = \ 96 LICENSE \ 97 autogen.sh \ 98 event_rpcgen.py \ 99 libevent.pc.in \ 100 Doxyfile \ 101 whatsnew-2.0.txt \ 102 Makefile.nmake test/Makefile.nmake \ 103 $(PLATFORM_DEPENDENT_SRC) 104 105LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la 106if PTHREADS 107LIBEVENT_LIBS_LA += libevent_pthreads.la 108endif 109if OPENSSL 110LIBEVENT_LIBS_LA += libevent_openssl.la 111endif 112 113if INSTALL_LIBEVENT 114lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA) 115else 116noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA) 117endif 118 119SUBDIRS = . include sample test 120 121if BUILD_WIN32 122 123SYS_LIBS = -lws2_32 -lshell32 -ladvapi32 124SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \ 125 bufferevent_async.c 126SYS_INCLUDES = -IWIN32-Code 127 128else 129 130SYS_LIBS = 131SYS_SRC = 132SYS_INCLUDES = 133 134endif 135 136if SELECT_BACKEND 137SYS_SRC += select.c 138endif 139if POLL_BACKEND 140SYS_SRC += poll.c 141endif 142if DEVPOLL_BACKEND 143SYS_SRC += devpoll.c 144endif 145if KQUEUE_BACKEND 146SYS_SRC += kqueue.c 147endif 148if EPOLL_BACKEND 149SYS_SRC += epoll.c 150endif 151if EVPORT_BACKEND 152SYS_SRC += evport.c 153endif 154if SIGNAL_SUPPORT 155SYS_SRC += signal.c 156endif 157 158BUILT_SOURCES = ./include/event2/event-config.h 159 160./include/event2/event-config.h: config.h 161 @MKDIR_P@ ./include/event2 162 echo '/* event2/event-config.h' > $@ 163 echo ' *' >> $@ 164 echo ' * This file was generated by autoconf when libevent was built, and post-' >> $@ 165 echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $@ 166 echo ' *' >> $@ 167 echo ' * DO NOT EDIT THIS FILE.' >> $@ 168 echo ' *' >> $@ 169 echo ' * Do not rely on macros in this file existing in later versions.'>> $@ 170 echo ' */' >> $@ 171 echo '#ifndef _EVENT2_EVENT_CONFIG_H_' >> $@ 172 echo '#define _EVENT2_EVENT_CONFIG_H_' >> $@ 173 174 sed -e 's/#define /#define _EVENT_/' \ 175 -e 's/#undef /#undef _EVENT_/' \ 176 -e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@ 177 echo "#endif" >> $@ 178 179CORE_SRC = event.c evthread.c buffer.c \ 180 bufferevent.c bufferevent_sock.c bufferevent_filter.c \ 181 bufferevent_pair.c listener.c bufferevent_ratelim.c \ 182 evmap.c log.c evutil.c evutil_rand.c strlcpy.c $(SYS_SRC) 183EXTRA_SRC = event_tagging.c http.c evdns.c evrpc.c 184 185if BUILD_WITH_NO_UNDEFINED 186NO_UNDEFINED = -no-undefined 187MAYBE_CORE = libevent_core.la 188else 189NO_UNDEFINED = 190MAYBE_CORE = 191endif 192 193GENERIC_LDFLAGS = -static 194 195libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC) 196libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) 197libevent_la_LDFLAGS = $(GENERIC_LDFLAGS) 198 199libevent_core_la_SOURCES = $(CORE_SRC) 200libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) 201libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS) 202 203if PTHREADS 204libevent_pthreads_la_SOURCES = evthread_pthread.c 205libevent_pthreads_la_LIBADD = $(MAYBE_CORE) 206libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS) 207endif 208 209libevent_extra_la_SOURCES = $(EXTRA_SRC) 210libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS) 211libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS) 212 213if OPENSSL 214libevent_openssl_la_SOURCES = bufferevent_openssl.c 215libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS) 216libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS) 217endif 218 219noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \ 220 evrpc-internal.h strlcpy-internal.h evbuffer-internal.h \ 221 bufferevent-internal.h http-internal.h event-internal.h \ 222 evthread-internal.h ht-internal.h defer-internal.h \ 223 minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \ 224 changelist-internal.h iocp-internal.h \ 225 ratelim-internal.h \ 226 WIN32-Code/event2/event-config.h \ 227 WIN32-Code/tree.h \ 228 compat/sys/queue.h 229 230EVENT1_HDRS = event.h evhttp.h evdns.h evrpc.h evutil.h 231 232if INSTALL_LIBEVENT 233include_HEADERS = $(EVENT1_HDRS) 234else 235noinst_HEADERS += $(EVENT1_HDRS) 236endif 237 238AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES) 239 240verify: check 241 242doxygen: FORCE 243 doxygen $(srcdir)/Doxyfile 244FORCE: 245 246DISTCLEANFILES = *~ ./include/event2/event-config.h 247 248install: 249 250