16228fb279071b845e136a3471e9efad40ddbb9f
[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         ContainerTraits.h \
48         Conv.h \
49         CppAttributes.h \
50         CpuId.h \
51         CPortability.h \
52         detail/AtomicHashUtils.h \
53         detail/AtomicUnorderedMapUtils.h \
54         detail/BitIteratorDetail.h \
55         detail/BitsDetail.h \
56         detail/CacheLocality.h \
57         detail/ChecksumDetail.h \
58         detail/DiscriminatedPtrDetail.h \
59         detail/ExceptionWrapper.h \
60         detail/FileUtilDetail.h \
61         detail/FingerprintPolynomial.h \
62         detail/FunctionalExcept.h \
63         detail/Futex.h \
64         detail/GroupVarintDetail.h \
65         detail/IPAddress.h \
66         detail/IPAddressSource.h \
67         detail/Malloc.h \
68         detail/MemoryIdler.h \
69         detail/MPMCPipelineDetail.h \
70         detail/RangeCommon.h \
71         detail/RangeSse42.h \
72         detail/Sleeper.h \
73         detail/SlowFingerprint.h \
74         detail/SocketFastOpen.h \
75         detail/SpinLockImpl.h \
76         detail/StaticSingletonManager.h \
77         detail/Stats.h \
78         detail/ThreadLocalDetail.h \
79         detail/TurnSequencer.h \
80         detail/UncaughtExceptionCounter.h \
81         Demangle.h \
82         DiscriminatedPtr.h \
83         DynamicConverter.h \
84         dynamic.h \
85         dynamic-inl.h \
86         Enumerate.h \
87         EvictingCacheMap.h \
88         Exception.h \
89         ExceptionString.h \
90         ExceptionWrapper.h \
91         Executor.h \
92         Expected.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/ScopedBoundPort.h \
231         io/async/test/SocketPair.h \
232         io/async/test/TimeUtil.h \
233         io/async/test/UndelayedDestruction.h \
234         io/async/test/Util.h \
235         json.h \
236         Lazy.h \
237         LifoSem.h \
238         Likely.h \
239         LockTraits.h \
240         LockTraitsBoost.h \
241         Logging.h \
242         MacAddress.h \
243         MallctlHelper.h \
244         Malloc.h \
245         MapUtil.h \
246         Memory.h \
247         MemoryMapping.h \
248         MicroSpinLock.h \
249         MicroLock.h \
250         MoveWrapper.h \
251         MPMCPipeline.h \
252         MPMCQueue.h \
253         Optional.h \
254         PackedSyncPtr.h \
255         Padded.h \
256         Partial.h \
257         PicoSpinLock.h \
258         Portability.h \
259         portability/Asm.h \
260         portability/Atomic.h \
261         portability/Builtins.h \
262         portability/Config.h \
263         portability/Constexpr.h \
264         portability/Dirent.h \
265         portability/Environment.h \
266         portability/Event.h \
267         portability/Fcntl.h \
268         portability/GFlags.h \
269         portability/IOVec.h \
270         portability/Libgen.h \
271         portability/Malloc.h \
272         portability/Math.h \
273         portability/Memory.h \
274         portability/PThread.h \
275         portability/Sockets.h \
276         portability/Stdio.h \
277         portability/Stdlib.h \
278         portability/String.h \
279         portability/Syslog.h \
280         portability/SysFile.h \
281         portability/SysMembarrier.h \
282         portability/SysMman.h \
283         portability/SysResource.h \
284         portability/SysStat.h \
285         portability/SysSyscall.h \
286         portability/SysTime.h \
287         portability/SysTypes.h \
288         portability/SysUio.h \
289         portability/Time.h \
290         portability/Windows.h \
291         portability/Unistd.h \
292         Preprocessor.h \
293         ProducerConsumerQueue.h \
294         Random.h \
295         Random-inl.h \
296         Range.h \
297         RWSpinLock.h \
298         ScopeGuard.h \
299         SharedMutex.h \
300         Singleton.h \
301         Singleton-inl.h \
302         SingletonThreadLocal.h \
303         SmallLocks.h \
304         small_vector.h \
305         SocketAddress.h \
306         sorted_vector_types.h \
307         SparseByteSet.h \
308         SpinLock.h \
309         SpookyHashV1.h \
310         SpookyHashV2.h \
311         ssl/OpenSSLHash.h \
312         stats/BucketedTimeSeries-defs.h \
313         stats/BucketedTimeSeries.h \
314         stats/Histogram-defs.h \
315         stats/Histogram.h \
316         stats/MultiLevelTimeSeries-defs.h \
317         stats/MultiLevelTimeSeries.h \
318         stats/TimeseriesHistogram-defs.h \
319         stats/TimeseriesHistogram.h \
320         stop_watch.h \
321         String.h \
322         String-inl.h \
323         Subprocess.h \
324         Synchronized.h \
325         test/FBStringTestBenchmarks.cpp.h \
326         test/FBVectorTestBenchmarks.cpp.h \
327         test/function_benchmark/benchmark_impl.h \
328         test/function_benchmark/test_functions.h \
329         test/SynchronizedTestLib.h \
330         test/SynchronizedTestLib-inl.h \
331         test/TestUtils.h \
332         ThreadCachedArena.h \
333         ThreadCachedInt.h \
334         ThreadLocal.h \
335         ThreadName.h \
336         TimeoutQueue.h \
337         Traits.h \
338         Try-inl.h \
339         Try.h \
340         Unicode.h \
341         Function.h \
342         Unit.h \
343         Uri.h \
344         Uri-inl.h \
345         Varint.h \
346         VersionCheck.h
347
348 FormatTables.cpp: build/generate_format_tables.py
349         $(PYTHON) build/generate_format_tables.py
350 CLEANFILES += FormatTables.cpp
351
352 EscapeTables.cpp: build/generate_escape_tables.py
353         $(PYTHON) build/generate_escape_tables.py
354 CLEANFILES += EscapeTables.cpp
355
356 GroupVarintTables.cpp: build/generate_varint_tables.py
357         $(PYTHON) build/generate_varint_tables.py
358 CLEANFILES += GroupVarintTables.cpp
359
360 libfollybase_la_SOURCES = \
361         Conv.cpp \
362         Demangle.cpp \
363         detail/RangeCommon.cpp \
364         detail/RangeSse42.cpp \
365         EscapeTables.cpp \
366         Format.cpp \
367         FormatTables.cpp \
368         MallctlHelper.cpp \
369         StringBase.cpp \
370         String.cpp \
371         Unicode.cpp
372
373 libfolly_la_SOURCES = \
374         Assume.cpp \
375         Bits.cpp \
376         Checksum.cpp \
377         ClockGettimeWrappers.cpp \
378         detail/CacheLocality.cpp \
379         detail/IPAddress.cpp \
380         dynamic.cpp \
381         File.cpp \
382         FileUtil.cpp \
383         FingerprintTables.cpp \
384         futures/Barrier.cpp \
385         futures/Future.cpp \
386         futures/InlineExecutor.cpp \
387         futures/ManualExecutor.cpp \
388         futures/QueuedImmediateExecutor.cpp \
389         futures/ThreadWheelTimekeeper.cpp \
390         detail/Futex.cpp \
391         detail/StaticSingletonManager.cpp \
392         detail/ThreadLocalDetail.cpp \
393         GroupVarint.cpp \
394         GroupVarintTables.cpp \
395         IPAddress.cpp \
396         IPAddressV4.cpp \
397         IPAddressV6.cpp \
398         LifoSem.cpp \
399         io/Compression.cpp \
400         io/Cursor.cpp \
401         io/IOBuf.cpp \
402         io/IOBufQueue.cpp \
403         io/RecordIO.cpp \
404         io/ShutdownSocketSet.cpp \
405         io/async/AsyncPipe.cpp \
406         io/async/AsyncTimeout.cpp \
407         io/async/AsyncUDPSocket.cpp \
408         io/async/AsyncServerSocket.cpp \
409         io/async/AsyncSignalHandler.cpp \
410         io/async/AsyncSocket.cpp \
411         io/async/AsyncSSLSocket.cpp \
412         io/async/EventBase.cpp \
413         io/async/EventBaseLocal.cpp \
414         io/async/EventBaseManager.cpp \
415         io/async/EventHandler.cpp \
416         io/async/Request.cpp \
417         io/async/SSLContext.cpp \
418         io/async/ScopedEventBaseThread.cpp \
419         io/async/HHWheelTimer.cpp \
420         io/async/test/ScopedBoundPort.cpp \
421         io/async/test/SocketPair.cpp \
422         io/async/test/TimeUtil.cpp \
423         io/async/ssl/OpenSSLUtils.cpp \
424         io/async/ssl/SSLErrors.cpp \
425         json.cpp \
426         detail/MemoryIdler.cpp \
427         detail/SocketFastOpen.cpp \
428         MacAddress.cpp \
429         MemoryMapping.cpp \
430         portability/Dirent.cpp \
431         portability/Environment.cpp \
432         portability/Fcntl.cpp \
433         portability/Libgen.cpp \
434         portability/Malloc.cpp \
435         portability/Memory.cpp \
436         portability/Sockets.cpp \
437         portability/Stdio.cpp \
438         portability/Stdlib.cpp \
439         portability/String.cpp \
440         portability/SysFile.cpp \
441         portability/SysMembarrier.cpp \
442         portability/SysMman.cpp \
443         portability/SysResource.cpp \
444         portability/SysStat.cpp \
445         portability/SysTime.cpp \
446         portability/SysUio.cpp \
447         portability/Time.cpp \
448         portability/Unistd.cpp \
449         Random.cpp \
450         SafeAssert.cpp \
451         SharedMutex.cpp \
452         MicroLock.cpp \
453         Singleton.cpp \
454         SocketAddress.cpp \
455         SpookyHashV1.cpp \
456         SpookyHashV2.cpp \
457         ssl/OpenSSLHash.cpp \
458         stats/Instantiations.cpp \
459         Subprocess.cpp \
460         ThreadCachedArena.cpp \
461         TimeoutQueue.cpp \
462         Uri.cpp \
463         Version.cpp \
464         experimental/AsymmetricMemoryBarrier.cpp \
465         experimental/bser/Dump.cpp \
466         experimental/bser/Load.cpp \
467         experimental/DynamicParser.cpp \
468         experimental/FunctionScheduler.cpp \
469         experimental/io/FsUtil.cpp \
470         experimental/JSONSchema.cpp \
471         experimental/NestedCommandLineApp.cpp \
472         experimental/ProgramOptions.cpp \
473         experimental/Select64.cpp \
474         experimental/TestUtil.cpp
475
476 if HAVE_LINUX
477 nobase_follyinclude_HEADERS += \
478         experimental/io/HugePages.h
479 libfolly_la_SOURCES += \
480         experimental/io/HugePages.cpp
481 endif
482
483 if !HAVE_WEAK_SYMBOLS
484 libfollybase_la_SOURCES += detail/MallocImpl.cpp
485 endif
486
487 if !HAVE_BITS_FUNCTEXCEPT_H
488 libfollybase_la_SOURCES += detail/FunctionalExcept.cpp
489 endif
490
491 if HAVE_BOOST_CONTEXT
492 nobase_follyinclude_HEADERS += \
493         fibers/AddTasks.h \
494         fibers/AddTasks-inl.h \
495         fibers/Baton.h \
496         fibers/Baton-inl.h \
497         fibers/BoostContextCompatibility.h \
498         fibers/EventBaseLoopController.h \
499         fibers/EventBaseLoopController-inl.h \
500         fibers/Fiber.h \
501         fibers/Fiber-inl.h \
502         fibers/FiberManager.h \
503         fibers/FiberManager-inl.h \
504         fibers/FiberManagerMap.h \
505         fibers/ForEach.h \
506         fibers/ForEach-inl.h \
507         fibers/GenericBaton.h \
508         fibers/GuardPageAllocator.h \
509         fibers/LoopController.h \
510         fibers/Promise.h \
511         fibers/Promise-inl.h \
512         fibers/SimpleLoopController.h \
513         fibers/TimedMutex.h \
514         fibers/TimedMutex-inl.h \
515         fibers/TimeoutController.h \
516         fibers/traits.h \
517         fibers/WhenN.h \
518         fibers/WhenN-inl.h
519
520 libfolly_la_SOURCES += \
521         fibers/Baton.cpp \
522         fibers/Fiber.cpp \
523         fibers/FiberManager.cpp \
524         fibers/FiberManagerMap.cpp \
525         fibers/GuardPageAllocator.cpp \
526         fibers/TimeoutController.cpp
527 endif
528
529 libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
530
531 libfolly_la_LIBADD = libfollybase.la
532 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
533
534 FingerprintTables.cpp: generate_fingerprint_tables
535         ./generate_fingerprint_tables
536 CLEANFILES += FingerprintTables.cpp
537
538 libfollybenchmark_la_SOURCES = Benchmark.cpp
539 libfollybenchmark_la_LIBADD = libfolly.la
540 libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
541
542 # install pkg-config metadata file
543 pkgconfigdir = $(libdir)/pkgconfig
544 nodist_pkgconfig_DATA = libfolly.pc