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