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