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