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