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