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