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