Add a compatibility shim for working with libevent on MSVC
[folly.git] / folly / Makefile.am
1 if FOLLY_TESTMAIN
2 SUBDIRS = . experimental init test
3 else
4 SUBDIRS = . test
5 endif
6
7 ACLOCAL_AMFLAGS = -I m4
8
9 CLEANFILES =
10
11 noinst_PROGRAMS = generate_fingerprint_tables
12 generate_fingerprint_tables_SOURCES = build/GenerateFingerprintTables.cpp
13 generate_fingerprint_tables_LDADD = libfollybase.la
14
15 noinst_LTLIBRARIES = \
16         libfollybase.la
17
18 lib_LTLIBRARIES = \
19         libfolly.la \
20         libfollybenchmark.la
21
22 follyincludedir = $(includedir)/folly
23
24 nobase_follyinclude_HEADERS = \
25         ApplyTuple.h \
26         Arena.h \
27         Arena-inl.h \
28         Array.h \
29         Assume.h \
30         AtomicBitSet.h \
31         AtomicHashArray.h \
32         AtomicHashArray-inl.h \
33         AtomicHashMap.h \
34         AtomicHashMap-inl.h \
35         AtomicIntrusiveLinkedList.h \
36         AtomicLinkedList.h \
37         AtomicStruct.h \
38         AtomicUnorderedMap.h \
39         Baton.h \
40         Benchmark.h \
41         Bits.h \
42         CallOnce.h \
43         Checksum.h \
44         ConcurrentSkipList.h \
45         ConcurrentSkipList-inl.h \
46         ConditionallyExistent.h \
47         ContainerTraits.h \
48         Conv.h \
49         CppAttributes.h \
50         CpuId.h \
51         CPortability.h \
52         detail/AtomicHashUtils.h \
53         detail/AtomicUnorderedMapUtils.h \
54         detail/BitIteratorDetail.h \
55         detail/BitsDetail.h \
56         detail/CacheLocality.h \
57         detail/ChecksumDetail.h \
58         detail/DiscriminatedPtrDetail.h \
59         detail/ExceptionWrapper.h \
60         detail/FileUtilDetail.h \
61         detail/FingerprintPolynomial.h \
62         detail/FunctionalExcept.h \
63         detail/Futex.h \
64         detail/GroupVarintDetail.h \
65         detail/IPAddress.h \
66         detail/Malloc.h \
67         detail/MemoryIdler.h \
68         detail/MPMCPipelineDetail.h \
69         detail/RangeCommon.h \
70         detail/RangeSse42.h \
71         detail/Sleeper.h \
72         detail/SlowFingerprint.h \
73         detail/SpinLockImpl.h \
74         detail/StaticSingletonManager.h \
75         detail/Stats.h \
76         detail/ThreadLocalDetail.h \
77         detail/TurnSequencer.h \
78         detail/UncaughtExceptionCounter.h \
79         Demangle.h \
80         DiscriminatedPtr.h \
81         DynamicConverter.h \
82         dynamic.h \
83         dynamic-inl.h \
84         Exception.h \
85         ExceptionWrapper.h \
86         Executor.h \
87         EvictingCacheMap.h \
88         experimental/AutoTimer.h \
89         experimental/Bits.h \
90         experimental/BitVectorCoding.h \
91         experimental/DynamicParser.h \
92         experimental/DynamicParser-inl.h \
93         experimental/ExecutionObserver.h \
94         experimental/EliasFanoCoding.h \
95         experimental/EventCount.h \
96         experimental/Instructions.h \
97         experimental/bser/Bser.h \
98         experimental/fibers/AddTasks.h \
99         experimental/fibers/AddTasks-inl.h \
100         experimental/fibers/Baton.h \
101         experimental/fibers/Baton-inl.h \
102         experimental/fibers/BoostContextCompatibility.h \
103         experimental/fibers/EventBaseLoopController.h \
104         experimental/fibers/EventBaseLoopController-inl.h \
105         experimental/fibers/Fiber.h \
106         experimental/fibers/Fiber-inl.h \
107         experimental/fibers/FiberManager.h \
108         experimental/fibers/FiberManager-inl.h \
109         experimental/fibers/FiberManagerMap.h \
110         experimental/fibers/ForEach.h \
111         experimental/fibers/ForEach-inl.h \
112         experimental/fibers/GenericBaton.h \
113         experimental/fibers/GuardPageAllocator.h \
114         experimental/fibers/LoopController.h \
115         experimental/fibers/Promise.h \
116         experimental/fibers/Promise-inl.h \
117         experimental/fibers/SimpleLoopController.h \
118         experimental/fibers/TimedMutex.h \
119         experimental/fibers/TimedMutex-inl.h \
120         experimental/fibers/TimeoutController.h \
121         experimental/fibers/traits.h \
122         experimental/fibers/WhenN.h \
123         experimental/fibers/WhenN-inl.h \
124         experimental/FunctionScheduler.h \
125         experimental/FutureDAG.h \
126         experimental/io/FsUtil.h \
127         experimental/JSONSchema.h \
128         experimental/LockFreeRingBuffer.h \
129         experimental/NestedCommandLineApp.h \
130         experimental/ProgramOptions.h \
131         experimental/ReadMostlySharedPtr.h \
132         experimental/symbolizer/Elf.h \
133         experimental/symbolizer/ElfCache.h \
134         experimental/symbolizer/Dwarf.h \
135         experimental/symbolizer/LineReader.h \
136         experimental/symbolizer/SignalHandler.h \
137         experimental/symbolizer/StackTrace.cpp \
138         experimental/symbolizer/Symbolizer.h \
139         experimental/Select64.h \
140         experimental/StringKeyedCommon.h \
141         experimental/StringKeyedUnorderedMap.h \
142         experimental/StringKeyedUnorderedSet.h \
143         experimental/TestUtil.h \
144         experimental/TLRefCount.h \
145         experimental/TupleOps.h \
146         FBString.h \
147         FBVector.h \
148         File.h \
149         FileUtil.h \
150         Fingerprint.h \
151         folly-config.h \
152         Foreach.h \
153         FormatArg.h \
154         FormatTraits.h \
155         Format.h \
156         Format-inl.h \
157         futures/Barrier.h \
158         futures/ThreadedExecutor.h \
159         futures/DrivableExecutor.h \
160         futures/Future-pre.h \
161         futures/helpers.h \
162         futures/Future.h \
163         futures/Future-inl.h \
164         futures/FutureException.h \
165         futures/InlineExecutor.h \
166         futures/ManualExecutor.h \
167         futures/OpaqueCallbackShunt.h \
168         futures/Promise-inl.h \
169         futures/Promise.h \
170         futures/QueuedImmediateExecutor.h \
171         futures/ScheduledExecutor.h \
172         futures/SharedPromise.h \
173         futures/SharedPromise-inl.h \
174         futures/ThreadWheelTimekeeper.h \
175         futures/Timekeeper.h \
176         futures/Try-inl.h \
177         futures/Try.h \
178         futures/Unit.h \
179         futures/detail/Core.h \
180         futures/detail/FSM.h \
181         futures/detail/Types.h \
182         gen/Base.h \
183         gen/Base-inl.h \
184         gen/Combine.h \
185         gen/Combine-inl.h \
186         gen/Core.h \
187         gen/Core-inl.h \
188         gen/File.h \
189         gen/File-inl.h \
190         gen/Parallel.h \
191         gen/Parallel-inl.h \
192         gen/ParallelMap.h \
193         gen/ParallelMap-inl.h \
194         gen/String.h \
195         gen/String-inl.h \
196         GroupVarint.h \
197         Hash.h \
198         IPAddress.h \
199         IPAddressV4.h \
200         IPAddressV6.h \
201         IPAddressException.h \
202         Indestructible.h \
203         IndexedMemPool.h \
204         init/Init.h \
205         IntrusiveList.h \
206         io/Compression.h \
207         io/Cursor.h \
208         io/IOBuf.h \
209         io/IOBufQueue.h \
210         io/RecordIO.h \
211         io/RecordIO-inl.h \
212         io/TypedIOBuf.h \
213         io/ShutdownSocketSet.h \
214         io/async/AsyncPipe.h \
215         io/async/AsyncTimeout.h \
216         io/async/AsyncTransport.h \
217         io/async/AsyncUDPServerSocket.h \
218         io/async/AsyncUDPSocket.h \
219         io/async/AsyncServerSocket.h \
220         io/async/AsyncSignalHandler.h \
221         io/async/AsyncSocket.h \
222         io/async/AsyncSocketBase.h \
223         io/async/AsyncSSLSocket.h \
224         io/async/AsyncSocketException.h \
225         io/async/DelayedDestructionBase.h \
226         io/async/DelayedDestruction.h \
227         io/async/EventBase.h \
228         io/async/EventBaseLocal.h \
229         io/async/EventBaseManager.h \
230         io/async/EventFDWrapper.h \
231         io/async/EventHandler.h \
232         io/async/EventUtil.h \
233         io/async/NotificationQueue.h \
234         io/async/HHWheelTimer.h \
235         io/async/ssl/OpenSSLPtrTypes.h \
236         io/async/ssl/OpenSSLUtils.h \
237         io/async/ssl/SSLErrors.h \
238         io/async/ssl/TLSDefinitions.h \
239         io/async/Request.h \
240         io/async/SSLContext.h \
241         io/async/ScopedEventBaseThread.h \
242         io/async/TimeoutManager.h \
243         io/async/test/AsyncSSLSocketTest.h \
244         io/async/test/BlockingSocket.h \
245         io/async/test/MockAsyncSocket.h \
246         io/async/test/MockAsyncServerSocket.h \
247         io/async/test/MockAsyncSSLSocket.h \
248         io/async/test/MockAsyncTransport.h \
249         io/async/test/MockAsyncUDPSocket.h \
250         io/async/test/MockTimeoutManager.h \
251         io/async/test/SocketPair.h \
252         io/async/test/TimeUtil.h \
253         io/async/test/UndelayedDestruction.h \
254         io/async/test/Util.h \
255         json.h \
256         Lazy.h \
257         LifoSem.h \
258         Likely.h \
259         Logging.h \
260         MacAddress.h \
261         Malloc.h \
262         MapUtil.h \
263         Memory.h \
264         MemoryMapping.h \
265         MicroSpinLock.h \
266         MicroLock.h \
267         MoveWrapper.h \
268         MPMCPipeline.h \
269         MPMCQueue.h \
270         Optional.h \
271         PackedSyncPtr.h \
272         Padded.h \
273         PicoSpinLock.h \
274         Portability.h \
275         portability/Asm.h \
276         portability/Builtins.h \
277         portability/Config.h \
278         portability/Constexpr.h \
279         portability/Dirent.h \
280         portability/Environment.h \
281         portability/Event.h \
282         portability/Fcntl.h \
283         portability/GFlags.h \
284         portability/IOVec.h \
285         portability/Libgen.h \
286         portability/Malloc.h \
287         portability/Memory.h \
288         portability/PThread.h \
289         portability/Sockets.h \
290         portability/Stdio.h \
291         portability/Stdlib.h \
292         portability/String.h \
293         portability/Syslog.h \
294         portability/SysFile.h \
295         portability/SysMman.h \
296         portability/SysResource.h \
297         portability/SysStat.h \
298         portability/SysSyscall.h \
299         portability/SysTime.h \
300         portability/SysTypes.h \
301         portability/SysUio.h \
302         portability/Time.h \
303         portability/Windows.h \
304         portability/Unistd.h \
305         Preprocessor.h \
306         ProducerConsumerQueue.h \
307         Random.h \
308         Random-inl.h \
309         Range.h \
310         RWSpinLock.h \
311         ScopeGuard.h \
312         SharedMutex.h \
313         Singleton.h \
314         Singleton-inl.h \
315         SingletonThreadLocal.h \
316         SmallLocks.h \
317         small_vector.h \
318         SocketAddress.h \
319         sorted_vector_types.h \
320         SparseByteSet.h \
321         SpinLock.h \
322         SpookyHashV1.h \
323         SpookyHashV2.h \
324         stats/BucketedTimeSeries-defs.h \
325         stats/BucketedTimeSeries.h \
326         stats/Histogram-defs.h \
327         stats/Histogram.h \
328         stats/MultiLevelTimeSeries-defs.h \
329         stats/MultiLevelTimeSeries.h \
330         stats/TimeseriesHistogram-defs.h \
331         stats/TimeseriesHistogram.h \
332         String.h \
333         String-inl.h \
334         Subprocess.h \
335         Synchronized.h \
336         test/FBStringTestBenchmarks.cpp.h \
337         test/FBVectorTestBenchmarks.cpp.h \
338         test/function_benchmark/benchmark_impl.h \
339         test/function_benchmark/test_functions.h \
340         test/SynchronizedTestLib.h \
341         test/SynchronizedTestLib-inl.h \
342         test/TestUtils.h \
343         ThreadCachedArena.h \
344         ThreadCachedInt.h \
345         ThreadLocal.h \
346         ThreadName.h \
347         TimeoutQueue.h \
348         Traits.h \
349         Unicode.h \
350         Function.h \
351         Uri.h \
352         Uri-inl.h \
353         Varint.h \
354         VersionCheck.h
355
356 FormatTables.cpp: build/generate_format_tables.py
357         $(PYTHON) build/generate_format_tables.py
358 CLEANFILES += FormatTables.cpp
359
360 EscapeTables.cpp: build/generate_escape_tables.py
361         $(PYTHON) build/generate_escape_tables.py
362 CLEANFILES += EscapeTables.cpp
363
364 GroupVarintTables.cpp: build/generate_varint_tables.py
365         $(PYTHON) build/generate_varint_tables.py
366 CLEANFILES += GroupVarintTables.cpp
367
368 libfollybase_la_SOURCES = \
369         Conv.cpp \
370         Demangle.cpp \
371         detail/RangeCommon.cpp \
372         detail/RangeSse42.cpp \
373         EscapeTables.cpp \
374         Format.cpp \
375         FormatTables.cpp \
376         StringBase.cpp \
377         String.cpp \
378         Unicode.cpp
379
380 libfolly_la_SOURCES = \
381         Bits.cpp \
382         Checksum.cpp \
383         detail/CacheLocality.cpp \
384         dynamic.cpp \
385         File.cpp \
386         FileUtil.cpp \
387         FingerprintTables.cpp \
388         futures/Barrier.cpp \
389         futures/ThreadedExecutor.cpp \
390         futures/Future.cpp \
391         futures/InlineExecutor.cpp \
392         futures/ManualExecutor.cpp \
393         futures/QueuedImmediateExecutor.cpp \
394         futures/ThreadWheelTimekeeper.cpp \
395         detail/Futex.cpp \
396         detail/StaticSingletonManager.cpp \
397         detail/ThreadLocalDetail.cpp \
398         GroupVarint.cpp \
399         GroupVarintTables.cpp \
400         IPAddress.cpp \
401         IPAddressV4.cpp \
402         IPAddressV6.cpp \
403         LifoSem.cpp \
404         io/Compression.cpp \
405         io/IOBuf.cpp \
406         io/IOBufQueue.cpp \
407         io/RecordIO.cpp \
408         io/ShutdownSocketSet.cpp \
409         io/async/AsyncPipe.cpp \
410         io/async/AsyncTimeout.cpp \
411         io/async/AsyncUDPSocket.cpp \
412         io/async/AsyncServerSocket.cpp \
413         io/async/AsyncSignalHandler.cpp \
414         io/async/AsyncSocket.cpp \
415         io/async/AsyncSSLSocket.cpp \
416         io/async/EventBase.cpp \
417         io/async/EventBaseLocal.cpp \
418         io/async/EventBaseManager.cpp \
419         io/async/EventHandler.cpp \
420         io/async/Request.cpp \
421         io/async/SSLContext.cpp \
422         io/async/ScopedEventBaseThread.cpp \
423         io/async/HHWheelTimer.cpp \
424         io/async/test/SocketPair.cpp \
425         io/async/test/TimeUtil.cpp \
426         io/async/ssl/OpenSSLUtils.cpp \
427         io/async/ssl/SSLErrors.cpp \
428         json.cpp \
429         detail/MemoryIdler.cpp \
430         MacAddress.cpp \
431         MemoryMapping.cpp \
432         portability/Dirent.cpp \
433         portability/Environment.cpp \
434         portability/Fcntl.cpp \
435         portability/Libgen.cpp \
436         portability/Malloc.cpp \
437         portability/Memory.cpp \
438         portability/Sockets.cpp \
439         portability/Stdio.cpp \
440         portability/Stdlib.cpp \
441         portability/String.cpp \
442         portability/SysFile.cpp \
443         portability/SysMman.cpp \
444         portability/SysResource.cpp \
445         portability/SysStat.cpp \
446         portability/SysTime.cpp \
447         portability/Time.cpp \
448         portability/Unistd.cpp \
449         Random.cpp \
450         SafeAssert.cpp \
451         SharedMutex.cpp \
452         MicroLock.cpp \
453         Singleton.cpp \
454         SocketAddress.cpp \
455         SpookyHashV1.cpp \
456         SpookyHashV2.cpp \
457         stats/Instantiations.cpp \
458         Subprocess.cpp \
459         ThreadCachedArena.cpp \
460         TimeoutQueue.cpp \
461         Uri.cpp \
462         Version.cpp \
463         experimental/bser/Dump.cpp \
464         experimental/bser/Load.cpp \
465         experimental/DynamicParser.cpp \
466         experimental/fibers/Baton.cpp \
467         experimental/fibers/Fiber.cpp \
468         experimental/fibers/FiberManager.cpp \
469         experimental/fibers/FiberManagerMap.cpp \
470         experimental/fibers/GuardPageAllocator.cpp \
471         experimental/fibers/TimeoutController.cpp \
472         experimental/FunctionScheduler.cpp \
473         experimental/io/FsUtil.cpp \
474         experimental/JSONSchema.cpp \
475         experimental/NestedCommandLineApp.cpp \
476         experimental/ProgramOptions.cpp \
477         experimental/Select64.cpp \
478         experimental/TestUtil.cpp
479
480 if HAVE_LINUX
481 nobase_follyinclude_HEADERS += \
482         experimental/io/HugePages.h
483 libfolly_la_SOURCES += \
484         experimental/io/HugePages.cpp
485 endif
486
487 if !HAVE_WEAK_SYMBOLS
488 libfollybase_la_SOURCES += detail/MallocImpl.cpp
489 endif
490
491 if !HAVE_BITS_FUNCTEXCEPT_H
492 libfollybase_la_SOURCES += detail/FunctionalExcept.cpp
493 endif
494
495 libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
496
497 libfolly_la_LIBADD = libfollybase.la
498 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
499
500 FingerprintTables.cpp: generate_fingerprint_tables
501         ./generate_fingerprint_tables
502 CLEANFILES += FingerprintTables.cpp
503
504 libfollybenchmark_la_SOURCES = Benchmark.cpp
505 libfollybenchmark_la_LIBADD = libfolly.la
506 libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)