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