Move runAfterDelay/tryRunAfterDelay into TimeoutManager
[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         libfollybasesse42.la \
17         libfollybase.la
18
19 lib_LTLIBRARIES = \
20         libfolly.la \
21         libfollybenchmark.la
22
23 follyincludedir = $(includedir)/folly
24
25 nobase_follyinclude_HEADERS = \
26         ApplyTuple.h \
27         Arena.h \
28         Arena-inl.h \
29         Array.h \
30         Assume.h \
31         AtomicBitSet.h \
32         AtomicHashArray.h \
33         AtomicHashArray-inl.h \
34         AtomicHashMap.h \
35         AtomicHashMap-inl.h \
36         AtomicIntrusiveLinkedList.h \
37         AtomicLinkedList.h \
38         AtomicStruct.h \
39         AtomicUnorderedMap.h \
40         Baton.h \
41         Benchmark.h \
42         Bits.h \
43         CachelinePadded.h \
44         CallOnce.h \
45         Checksum.h \
46         ClockGettimeWrappers.h \
47         ConcurrentSkipList.h \
48         ConcurrentSkipList-inl.h \
49         ContainerTraits.h \
50         Conv.h \
51         CppAttributes.h \
52         CpuId.h \
53         CPortability.h \
54         detail/AtomicHashUtils.h \
55         detail/AtomicUnorderedMapUtils.h \
56         detail/BitIteratorDetail.h \
57         detail/BitsDetail.h \
58         detail/CacheLocality.h \
59         detail/CachelinePaddedImpl.h \
60         detail/ChecksumDetail.h \
61         detail/DiscriminatedPtrDetail.h \
62         detail/ExceptionWrapper.h \
63         detail/FileUtilDetail.h \
64         detail/FingerprintPolynomial.h \
65         detail/Futex.h \
66         detail/GroupVarintDetail.h \
67         detail/IPAddress.h \
68         detail/IPAddressSource.h \
69         detail/Malloc.h \
70         detail/MemoryIdler.h \
71         detail/MPMCPipelineDetail.h \
72         detail/RangeCommon.h \
73         detail/RangeSse42.h \
74         detail/Sleeper.h \
75         detail/SlowFingerprint.h \
76         detail/SocketFastOpen.h \
77         detail/SpinLockImpl.h \
78         detail/StaticSingletonManager.h \
79         detail/Stats.h \
80         detail/ThreadLocalDetail.h \
81   detail/TryDetail.h \
82         detail/TurnSequencer.h \
83         detail/UncaughtExceptionCounter.h \
84         Demangle.h \
85         DiscriminatedPtr.h \
86         DynamicConverter.h \
87         dynamic.h \
88         dynamic-inl.h \
89         Enumerate.h \
90         EvictingCacheMap.h \
91         Exception.h \
92         ExceptionString.h \
93         ExceptionWrapper.h \
94         Executor.h \
95         Expected.h \
96         experimental/AsymmetricMemoryBarrier.h \
97         experimental/AutoTimer.h \
98         experimental/Bits.h \
99         experimental/BitVectorCoding.h \
100         experimental/DynamicParser.h \
101         experimental/DynamicParser-inl.h \
102         experimental/ExecutionObserver.h \
103         experimental/EliasFanoCoding.h \
104         experimental/EventCount.h \
105         experimental/Instructions.h \
106         experimental/bser/Bser.h \
107         experimental/FunctionScheduler.h \
108         experimental/FutureDAG.h \
109         experimental/io/FsUtil.h \
110         experimental/JSONSchema.h \
111         experimental/LockFreeRingBuffer.h \
112         experimental/NestedCommandLineApp.h \
113         experimental/observer/detail/Core.h \
114         experimental/observer/detail/GraphCycleDetector.h \
115         experimental/observer/detail/ObserverManager.h \
116         experimental/observer/detail/Observer-pre.h \
117         experimental/observer/Observable.h \
118         experimental/observer/Observable-inl.h \
119         experimental/observer/Observer.h \
120         experimental/observer/Observer-inl.h \
121         experimental/observer/SimpleObservable.h \
122         experimental/observer/SimpleObservable-inl.h \
123         experimental/ProgramOptions.h \
124         experimental/ReadMostlySharedPtr.h \
125         experimental/symbolizer/Elf.h \
126         experimental/symbolizer/Elf-inl.h \
127         experimental/symbolizer/ElfCache.h \
128         experimental/symbolizer/Dwarf.h \
129         experimental/symbolizer/LineReader.h \
130         experimental/symbolizer/SignalHandler.h \
131         experimental/symbolizer/StackTrace.h \
132         experimental/symbolizer/Symbolizer.h \
133         experimental/Select64.h \
134         experimental/StringKeyedCommon.h \
135         experimental/StringKeyedMap.h \
136         experimental/StringKeyedSet.h \
137         experimental/StringKeyedUnorderedMap.h \
138         experimental/StringKeyedUnorderedSet.h \
139         experimental/TestUtil.h \
140         experimental/TLRefCount.h \
141         experimental/TupleOps.h \
142         FBString.h \
143         FBVector.h \
144         File.h \
145         FileUtil.h \
146         Fingerprint.h \
147         folly-config.h \
148         Foreach.h \
149         FormatArg.h \
150         FormatTraits.h \
151         Format.h \
152         Format-inl.h \
153         futures/Barrier.h \
154         futures/DrivableExecutor.h \
155         futures/Future-pre.h \
156         futures/helpers.h \
157         futures/Future.h \
158         futures/Future-inl.h \
159         futures/FutureException.h \
160         futures/InlineExecutor.h \
161         futures/ManualExecutor.h \
162         futures/OpaqueCallbackShunt.h \
163         futures/Promise-inl.h \
164         futures/Promise.h \
165         futures/QueuedImmediateExecutor.h \
166         futures/ScheduledExecutor.h \
167         futures/SharedPromise.h \
168         futures/SharedPromise-inl.h \
169         futures/ThreadWheelTimekeeper.h \
170         futures/Timekeeper.h \
171         futures/detail/Core.h \
172         futures/detail/FSM.h \
173         futures/detail/Types.h \
174         gen/Base.h \
175         gen/Base-inl.h \
176         gen/Combine.h \
177         gen/Combine-inl.h \
178         gen/Core.h \
179         gen/Core-inl.h \
180         gen/File.h \
181         gen/File-inl.h \
182         gen/Parallel.h \
183         gen/Parallel-inl.h \
184         gen/ParallelMap.h \
185         gen/ParallelMap-inl.h \
186         gen/String.h \
187         gen/String-inl.h \
188         GroupVarint.h \
189         Hash.h \
190         IPAddress.h \
191         IPAddressV4.h \
192         IPAddressV6.h \
193         IPAddressException.h \
194         Indestructible.h \
195         IndexedMemPool.h \
196         init/Init.h \
197         IntrusiveList.h \
198         io/Compression.h \
199         io/Cursor.h \
200         io/Cursor-inl.h \
201         io/IOBuf.h \
202         io/IOBufQueue.h \
203         io/RecordIO.h \
204         io/RecordIO-inl.h \
205         io/TypedIOBuf.h \
206         io/ShutdownSocketSet.h \
207         io/async/AsyncPipe.h \
208         io/async/AsyncTimeout.h \
209         io/async/AsyncTransport.h \
210         io/async/AsyncUDPServerSocket.h \
211         io/async/AsyncUDPSocket.h \
212         io/async/AsyncServerSocket.h \
213         io/async/AsyncSignalHandler.h \
214         io/async/AsyncSocket.h \
215         io/async/AsyncSocketBase.h \
216         io/async/AsyncSSLSocket.h \
217         io/async/AsyncSocketException.h \
218         io/async/DecoratedAsyncTransportWrapper.h \
219         io/async/DelayedDestructionBase.h \
220         io/async/DelayedDestruction.h \
221         io/async/EventBase.h \
222         io/async/EventBaseLocal.h \
223         io/async/EventBaseManager.h \
224         io/async/EventFDWrapper.h \
225         io/async/EventHandler.h \
226         io/async/EventUtil.h \
227         io/async/NotificationQueue.h \
228         io/async/HHWheelTimer.h \
229         io/async/ssl/OpenSSLPtrTypes.h \
230         io/async/ssl/OpenSSLUtils.h \
231         io/async/ssl/SSLErrors.h \
232         io/async/ssl/TLSDefinitions.h \
233         io/async/Request.h \
234         io/async/SSLContext.h \
235         io/async/ScopedEventBaseThread.h \
236         io/async/TimeoutManager.h \
237         io/async/WriteChainAsyncTransportWrapper.h \
238         io/async/test/AsyncSSLSocketTest.h \
239         io/async/test/BlockingSocket.h \
240         io/async/test/MockAsyncSocket.h \
241         io/async/test/MockAsyncServerSocket.h \
242         io/async/test/MockAsyncSSLSocket.h \
243         io/async/test/MockAsyncTransport.h \
244         io/async/test/MockAsyncUDPSocket.h \
245         io/async/test/MockTimeoutManager.h \
246         io/async/test/ScopedBoundPort.h \
247         io/async/test/SocketPair.h \
248         io/async/test/TimeUtil.h \
249         io/async/test/UndelayedDestruction.h \
250         io/async/test/Util.h \
251         json.h \
252         Lazy.h \
253         LifoSem.h \
254         Likely.h \
255         LockTraits.h \
256         LockTraitsBoost.h \
257         Logging.h \
258         MacAddress.h \
259         MallctlHelper.h \
260         Malloc.h \
261         MapUtil.h \
262         Math.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         Partial.h \
274         PicoSpinLock.h \
275         Portability.h \
276         portability/Asm.h \
277         portability/Atomic.h \
278         portability/BitsFunctexcept.h \
279         portability/Builtins.h \
280         portability/Config.h \
281         portability/Constexpr.h \
282         portability/Dirent.h \
283         portability/Environment.h \
284         portability/Event.h \
285         portability/Fcntl.h \
286         portability/GFlags.h \
287         portability/GMock.h \
288         portability/GTest.h \
289         portability/IOVec.h \
290         portability/Libgen.h \
291         portability/Malloc.h \
292         portability/Math.h \
293         portability/Memory.h \
294         portability/PThread.h \
295         portability/Sockets.h \
296         portability/Stdio.h \
297         portability/Stdlib.h \
298         portability/String.h \
299         portability/Syslog.h \
300         portability/SysFile.h \
301         portability/SysMembarrier.h \
302         portability/SysMman.h \
303         portability/SysResource.h \
304         portability/SysStat.h \
305         portability/SysSyscall.h \
306         portability/SysTime.h \
307         portability/SysTypes.h \
308         portability/SysUio.h \
309         portability/Time.h \
310         portability/TypeTraits.h \
311         portability/Windows.h \
312         portability/Unistd.h \
313         Preprocessor.h \
314         ProducerConsumerQueue.h \
315         Random.h \
316         Random-inl.h \
317         Range.h \
318         RWSpinLock.h \
319         SafeAssert.h \
320         ScopeGuard.h \
321         SharedMutex.h \
322         Shell.h \
323         Singleton.h \
324         Singleton-inl.h \
325         SingletonThreadLocal.h \
326         SmallLocks.h \
327         small_vector.h \
328         SocketAddress.h \
329         sorted_vector_types.h \
330         SparseByteSet.h \
331         SpinLock.h \
332         SpookyHashV1.h \
333         SpookyHashV2.h \
334         ssl/OpenSSLHash.h \
335         ssl/SSLSession.h \
336         ssl/detail/OpenSSLVersionFinder.h \
337         ssl/detail/SSLSessionImpl.h \
338         stats/BucketedTimeSeries-defs.h \
339         stats/BucketedTimeSeries.h \
340         stats/Histogram-defs.h \
341         stats/Histogram.h \
342         stats/MultiLevelTimeSeries-defs.h \
343         stats/MultiLevelTimeSeries.h \
344         stats/TimeseriesHistogram-defs.h \
345         stats/TimeseriesHistogram.h \
346         stop_watch.h \
347         String.h \
348         String-inl.h \
349         Subprocess.h \
350         Synchronized.h \
351         test/FBStringTestBenchmarks.cpp.h \
352         test/FBVectorTestBenchmarks.cpp.h \
353         test/function_benchmark/benchmark_impl.h \
354         test/function_benchmark/test_functions.h \
355         test/SynchronizedTestLib.h \
356         test/SynchronizedTestLib-inl.h \
357         test/TestUtils.h \
358         ThreadCachedArena.h \
359         ThreadCachedInt.h \
360         ThreadLocal.h \
361         ThreadName.h \
362         TimeoutQueue.h \
363         TokenBucket.h \
364         Traits.h \
365         Try-inl.h \
366         Try.h \
367         Unicode.h \
368         Function.h \
369         Unit.h \
370         Uri.h \
371         Uri-inl.h \
372         Varint.h \
373         VersionCheck.h
374
375 FormatTables.cpp: build/generate_format_tables.py
376         $(PYTHON) build/generate_format_tables.py
377 CLEANFILES += FormatTables.cpp
378
379 EscapeTables.cpp: build/generate_escape_tables.py
380         $(PYTHON) build/generate_escape_tables.py
381 CLEANFILES += EscapeTables.cpp
382
383 GroupVarintTables.cpp: build/generate_varint_tables.py
384         $(PYTHON) build/generate_varint_tables.py
385 CLEANFILES += GroupVarintTables.cpp
386
387 libfollybasesse42_la_SOURCES = \
388         detail/RangeSse42.cpp
389
390 libfollybase_la_SOURCES = \
391         Conv.cpp \
392         Demangle.cpp \
393         detail/RangeCommon.cpp \
394         EscapeTables.cpp \
395         Format.cpp \
396         FormatTables.cpp \
397         MallctlHelper.cpp \
398         portability/BitsFunctexcept.cpp \
399         StringBase.cpp \
400         String.cpp \
401         Unicode.cpp
402
403 libfolly_la_SOURCES = \
404         Assume.cpp \
405         Bits.cpp \
406         Checksum.cpp \
407         ClockGettimeWrappers.cpp \
408         detail/CacheLocality.cpp \
409         detail/IPAddress.cpp \
410         dynamic.cpp \
411         File.cpp \
412         FileUtil.cpp \
413         FingerprintTables.cpp \
414         futures/Barrier.cpp \
415         futures/Future.cpp \
416         futures/InlineExecutor.cpp \
417         futures/ManualExecutor.cpp \
418         futures/QueuedImmediateExecutor.cpp \
419         futures/ThreadWheelTimekeeper.cpp \
420         detail/Futex.cpp \
421         detail/StaticSingletonManager.cpp \
422         detail/ThreadLocalDetail.cpp \
423         GroupVarint.cpp \
424         GroupVarintTables.cpp \
425         IPAddress.cpp \
426         IPAddressV4.cpp \
427         IPAddressV6.cpp \
428         LifoSem.cpp \
429         io/Compression.cpp \
430         io/Cursor.cpp \
431         io/IOBuf.cpp \
432         io/IOBufQueue.cpp \
433         io/RecordIO.cpp \
434         io/ShutdownSocketSet.cpp \
435         io/async/AsyncPipe.cpp \
436         io/async/AsyncTimeout.cpp \
437         io/async/AsyncUDPSocket.cpp \
438         io/async/AsyncServerSocket.cpp \
439         io/async/AsyncSignalHandler.cpp \
440         io/async/AsyncSocket.cpp \
441         io/async/AsyncSSLSocket.cpp \
442         io/async/EventBase.cpp \
443         io/async/EventBaseLocal.cpp \
444         io/async/EventBaseManager.cpp \
445         io/async/EventHandler.cpp \
446         io/async/Request.cpp \
447         io/async/SSLContext.cpp \
448         io/async/ScopedEventBaseThread.cpp \
449         io/async/HHWheelTimer.cpp \
450         io/async/TimeoutManager.cpp \
451         io/async/test/ScopedBoundPort.cpp \
452         io/async/test/SocketPair.cpp \
453         io/async/test/TimeUtil.cpp \
454         io/async/ssl/OpenSSLUtils.cpp \
455         io/async/ssl/SSLErrors.cpp \
456         json.cpp \
457         detail/MemoryIdler.cpp \
458         detail/SocketFastOpen.cpp \
459         MacAddress.cpp \
460         MemoryMapping.cpp \
461         portability/Dirent.cpp \
462         portability/Environment.cpp \
463         portability/Fcntl.cpp \
464         portability/Libgen.cpp \
465         portability/Malloc.cpp \
466         portability/Memory.cpp \
467         portability/Sockets.cpp \
468         portability/Stdio.cpp \
469         portability/Stdlib.cpp \
470         portability/String.cpp \
471         portability/SysFile.cpp \
472         portability/SysMembarrier.cpp \
473         portability/SysMman.cpp \
474         portability/SysResource.cpp \
475         portability/SysStat.cpp \
476         portability/SysTime.cpp \
477         portability/SysUio.cpp \
478         portability/Time.cpp \
479         portability/Unistd.cpp \
480         Random.cpp \
481         SafeAssert.cpp \
482         SharedMutex.cpp \
483         Shell.cpp \
484         MicroLock.cpp \
485         Singleton.cpp \
486         SocketAddress.cpp \
487         SpookyHashV1.cpp \
488         SpookyHashV2.cpp \
489         ssl/OpenSSLHash.cpp \
490         ssl/detail/SSLSessionImpl.cpp \
491         stats/Instantiations.cpp \
492         Subprocess.cpp \
493         ThreadCachedArena.cpp \
494         TimeoutQueue.cpp \
495         Uri.cpp \
496         Version.cpp \
497         experimental/AsymmetricMemoryBarrier.cpp \
498         experimental/bser/Dump.cpp \
499         experimental/bser/Load.cpp \
500         experimental/DynamicParser.cpp \
501         experimental/FunctionScheduler.cpp \
502         experimental/io/FsUtil.cpp \
503         experimental/JSONSchema.cpp \
504         experimental/NestedCommandLineApp.cpp \
505         experimental/observer/detail/Core.cpp \
506         experimental/observer/detail/ObserverManager.cpp \
507         experimental/ProgramOptions.cpp \
508         experimental/Select64.cpp \
509         experimental/TestUtil.cpp
510
511 if HAVE_LINUX
512 nobase_follyinclude_HEADERS += \
513         experimental/io/HugePages.h
514 libfolly_la_SOURCES += \
515         experimental/io/HugePages.cpp
516 endif
517
518 if !HAVE_WEAK_SYMBOLS
519 libfollybase_la_SOURCES += detail/MallocImpl.cpp
520 endif
521
522 if HAVE_BOOST_CONTEXT
523 nobase_follyinclude_HEADERS += \
524         fibers/AddTasks.h \
525         fibers/AddTasks-inl.h \
526         fibers/AtomicBatchDispatcher.h \
527         fibers/AtomicBatchDispatcher-inl.h \
528         fibers/Baton.h \
529         fibers/Baton-inl.h \
530         fibers/BatchDispatcher.h \
531         fibers/BoostContextCompatibility.h \
532         fibers/EventBaseLoopController.h \
533         fibers/EventBaseLoopController-inl.h \
534         fibers/Fiber.h \
535         fibers/Fiber-inl.h \
536         fibers/FiberManager.h \
537         fibers/FiberManager-inl.h \
538         fibers/FiberManagerInternal.h \
539         fibers/FiberManagerInternal-inl.h \
540         fibers/FiberManagerMap.h \
541         fibers/ForEach.h \
542         fibers/ForEach-inl.h \
543         fibers/GenericBaton.h \
544         fibers/GuardPageAllocator.h \
545         fibers/LoopController.h \
546         fibers/Promise.h \
547         fibers/Promise-inl.h \
548         fibers/Semaphore.h \
549         fibers/SimpleLoopController.h \
550         fibers/TimedMutex.h \
551         fibers/TimedMutex-inl.h \
552         fibers/TimeoutController.h \
553         fibers/traits.h \
554         fibers/WhenN.h \
555         fibers/WhenN-inl.h
556
557 libfolly_la_SOURCES += \
558         fibers/Baton.cpp \
559         fibers/Fiber.cpp \
560         fibers/FiberManager.cpp \
561         fibers/FiberManagerMap.cpp \
562         fibers/GuardPageAllocator.cpp \
563         fibers/Semaphore.cpp \
564         fibers/TimeoutController.cpp
565 endif
566
567 libfollybasesse42_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
568 libfollybasesse42_la_CXXFLAGS = -msse4.2
569
570 libfollybase_la_LIBADD = libfollybasesse42.la
571 libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
572
573 libfolly_la_LIBADD = libfollybase.la
574 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
575
576 FingerprintTables.cpp: generate_fingerprint_tables
577         ./generate_fingerprint_tables
578 CLEANFILES += FingerprintTables.cpp
579
580 libfollybenchmark_la_SOURCES = Benchmark.cpp
581 libfollybenchmark_la_LIBADD = libfolly.la
582 libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
583
584 # install pkg-config metadata file
585 pkgconfigdir = $(libdir)/pkgconfig
586 nodist_pkgconfig_DATA = libfolly.pc