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