Python-like enumerate()
[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         ConcurrentSkipList.h \
45         ConcurrentSkipList-inl.h \
46         ConditionallyExistent.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/Malloc.h \
67         detail/MemoryIdler.h \
68         detail/MPMCPipelineDetail.h \
69         detail/RangeCommon.h \
70         detail/RangeSse42.h \
71         detail/Sleeper.h \
72         detail/SlowFingerprint.h \
73         detail/SocketFastOpen.h \
74         detail/SpinLockImpl.h \
75         detail/StaticSingletonManager.h \
76         detail/Stats.h \
77         detail/ThreadLocalDetail.h \
78         detail/TurnSequencer.h \
79         detail/UncaughtExceptionCounter.h \
80         Demangle.h \
81         DiscriminatedPtr.h \
82         DynamicConverter.h \
83         dynamic.h \
84         dynamic-inl.h \
85         Enumerate.h \
86         Exception.h \
87         ExceptionString.h \
88         ExceptionWrapper.h \
89         Executor.h \
90         EvictingCacheMap.h \
91         experimental/AutoTimer.h \
92         experimental/Bits.h \
93         experimental/BitVectorCoding.h \
94         experimental/DynamicParser.h \
95         experimental/DynamicParser-inl.h \
96         experimental/ExecutionObserver.h \
97         experimental/EliasFanoCoding.h \
98         experimental/EventCount.h \
99         experimental/Instructions.h \
100         experimental/bser/Bser.h \
101         experimental/FunctionScheduler.h \
102         experimental/FutureDAG.h \
103         experimental/io/FsUtil.h \
104         experimental/JSONSchema.h \
105         experimental/LockFreeRingBuffer.h \
106         experimental/NestedCommandLineApp.h \
107         experimental/ProgramOptions.h \
108         experimental/ReadMostlySharedPtr.h \
109         experimental/symbolizer/Elf.h \
110         experimental/symbolizer/ElfCache.h \
111         experimental/symbolizer/Dwarf.h \
112         experimental/symbolizer/LineReader.h \
113         experimental/symbolizer/SignalHandler.h \
114         experimental/symbolizer/StackTrace.cpp \
115         experimental/symbolizer/Symbolizer.h \
116         experimental/Select64.h \
117         experimental/StringKeyedCommon.h \
118         experimental/StringKeyedUnorderedMap.h \
119         experimental/StringKeyedUnorderedSet.h \
120         experimental/TestUtil.h \
121         experimental/TLRefCount.h \
122         experimental/TupleOps.h \
123         FBString.h \
124         FBVector.h \
125         File.h \
126         FileUtil.h \
127         Fingerprint.h \
128         folly-config.h \
129         Foreach.h \
130         FormatArg.h \
131         FormatTraits.h \
132         Format.h \
133         Format-inl.h \
134         futures/Barrier.h \
135         futures/DrivableExecutor.h \
136         futures/Future-pre.h \
137         futures/helpers.h \
138         futures/Future.h \
139         futures/Future-inl.h \
140         futures/FutureException.h \
141         futures/InlineExecutor.h \
142         futures/ManualExecutor.h \
143         futures/OpaqueCallbackShunt.h \
144         futures/Promise-inl.h \
145         futures/Promise.h \
146         futures/QueuedImmediateExecutor.h \
147         futures/ScheduledExecutor.h \
148         futures/SharedPromise.h \
149         futures/SharedPromise-inl.h \
150         futures/ThreadWheelTimekeeper.h \
151         futures/Timekeeper.h \
152         futures/detail/Core.h \
153         futures/detail/FSM.h \
154         futures/detail/Types.h \
155         gen/Base.h \
156         gen/Base-inl.h \
157         gen/Combine.h \
158         gen/Combine-inl.h \
159         gen/Core.h \
160         gen/Core-inl.h \
161         gen/File.h \
162         gen/File-inl.h \
163         gen/Parallel.h \
164         gen/Parallel-inl.h \
165         gen/ParallelMap.h \
166         gen/ParallelMap-inl.h \
167         gen/String.h \
168         gen/String-inl.h \
169         GroupVarint.h \
170         Hash.h \
171         IPAddress.h \
172         IPAddressV4.h \
173         IPAddressV6.h \
174         IPAddressException.h \
175         Indestructible.h \
176         IndexedMemPool.h \
177         init/Init.h \
178         IntrusiveList.h \
179         io/Compression.h \
180         io/Cursor.h \
181         io/Cursor-inl.h \
182         io/IOBuf.h \
183         io/IOBufQueue.h \
184         io/RecordIO.h \
185         io/RecordIO-inl.h \
186         io/TypedIOBuf.h \
187         io/ShutdownSocketSet.h \
188         io/async/AsyncPipe.h \
189         io/async/AsyncTimeout.h \
190         io/async/AsyncTransport.h \
191         io/async/AsyncUDPServerSocket.h \
192         io/async/AsyncUDPSocket.h \
193         io/async/AsyncServerSocket.h \
194         io/async/AsyncSignalHandler.h \
195         io/async/AsyncSocket.h \
196         io/async/AsyncSocketBase.h \
197         io/async/AsyncSSLSocket.h \
198         io/async/AsyncSocketException.h \
199         io/async/DelayedDestructionBase.h \
200         io/async/DelayedDestruction.h \
201         io/async/EventBase.h \
202         io/async/EventBaseLocal.h \
203         io/async/EventBaseManager.h \
204         io/async/EventFDWrapper.h \
205         io/async/EventHandler.h \
206         io/async/EventUtil.h \
207         io/async/NotificationQueue.h \
208         io/async/HHWheelTimer.h \
209         io/async/ssl/OpenSSLPtrTypes.h \
210         io/async/ssl/OpenSSLUtils.h \
211         io/async/ssl/SSLErrors.h \
212         io/async/ssl/TLSDefinitions.h \
213         io/async/Request.h \
214         io/async/SSLContext.h \
215         io/async/ScopedEventBaseThread.h \
216         io/async/TimeoutManager.h \
217         io/async/test/AsyncSSLSocketTest.h \
218         io/async/test/BlockingSocket.h \
219         io/async/test/MockAsyncSocket.h \
220         io/async/test/MockAsyncServerSocket.h \
221         io/async/test/MockAsyncSSLSocket.h \
222         io/async/test/MockAsyncTransport.h \
223         io/async/test/MockAsyncUDPSocket.h \
224         io/async/test/MockTimeoutManager.h \
225         io/async/test/SocketPair.h \
226         io/async/test/TimeUtil.h \
227         io/async/test/UndelayedDestruction.h \
228         io/async/test/Util.h \
229         json.h \
230         Lazy.h \
231         LifoSem.h \
232         Likely.h \
233         LockTraits.h \
234         LockTraitsBoost.h \
235         Logging.h \
236         MacAddress.h \
237         Malloc.h \
238         MapUtil.h \
239         Memory.h \
240         MemoryMapping.h \
241         MicroSpinLock.h \
242         MicroLock.h \
243         MoveWrapper.h \
244         MPMCPipeline.h \
245         MPMCQueue.h \
246         Optional.h \
247         PackedSyncPtr.h \
248         Padded.h \
249         PicoSpinLock.h \
250         Portability.h \
251         portability/Asm.h \
252         portability/Builtins.h \
253         portability/Config.h \
254         portability/Constexpr.h \
255         portability/Dirent.h \
256         portability/Environment.h \
257         portability/Event.h \
258         portability/Fcntl.h \
259         portability/GFlags.h \
260         portability/IOVec.h \
261         portability/Libgen.h \
262         portability/Malloc.h \
263         portability/Math.h \
264         portability/Memory.h \
265         portability/PThread.h \
266         portability/Sockets.h \
267         portability/Stdio.h \
268         portability/Stdlib.h \
269         portability/String.h \
270         portability/Syslog.h \
271         portability/SysFile.h \
272         portability/SysMman.h \
273         portability/SysResource.h \
274         portability/SysStat.h \
275         portability/SysSyscall.h \
276         portability/SysTime.h \
277         portability/SysTypes.h \
278         portability/SysUio.h \
279         portability/Time.h \
280         portability/Windows.h \
281         portability/Unistd.h \
282         Preprocessor.h \
283         ProducerConsumerQueue.h \
284         Random.h \
285         Random-inl.h \
286         Range.h \
287         RWSpinLock.h \
288         ScopeGuard.h \
289         SharedMutex.h \
290         Singleton.h \
291         Singleton-inl.h \
292         SingletonThreadLocal.h \
293         SmallLocks.h \
294         small_vector.h \
295         SocketAddress.h \
296         sorted_vector_types.h \
297         SparseByteSet.h \
298         SpinLock.h \
299         SpookyHashV1.h \
300         SpookyHashV2.h \
301         ssl/OpenSSLHash.h \
302         stats/BucketedTimeSeries-defs.h \
303         stats/BucketedTimeSeries.h \
304         stats/Histogram-defs.h \
305         stats/Histogram.h \
306         stats/MultiLevelTimeSeries-defs.h \
307         stats/MultiLevelTimeSeries.h \
308         stats/TimeseriesHistogram-defs.h \
309         stats/TimeseriesHistogram.h \
310         stop_watch.h \
311         String.h \
312         String-inl.h \
313         Subprocess.h \
314         Synchronized.h \
315         test/FBStringTestBenchmarks.cpp.h \
316         test/FBVectorTestBenchmarks.cpp.h \
317         test/function_benchmark/benchmark_impl.h \
318         test/function_benchmark/test_functions.h \
319         test/SynchronizedTestLib.h \
320         test/SynchronizedTestLib-inl.h \
321         test/TestUtils.h \
322         ThreadCachedArena.h \
323         ThreadCachedInt.h \
324         ThreadLocal.h \
325         ThreadName.h \
326         TimeoutQueue.h \
327         Traits.h \
328         Try-inl.h \
329         Try.h \
330         Unicode.h \
331         Function.h \
332         Unit.h \
333         Uri.h \
334         Uri-inl.h \
335         Varint.h \
336         VersionCheck.h
337
338 FormatTables.cpp: build/generate_format_tables.py
339         $(PYTHON) build/generate_format_tables.py
340 CLEANFILES += FormatTables.cpp
341
342 EscapeTables.cpp: build/generate_escape_tables.py
343         $(PYTHON) build/generate_escape_tables.py
344 CLEANFILES += EscapeTables.cpp
345
346 GroupVarintTables.cpp: build/generate_varint_tables.py
347         $(PYTHON) build/generate_varint_tables.py
348 CLEANFILES += GroupVarintTables.cpp
349
350 libfollybase_la_SOURCES = \
351         Conv.cpp \
352         Demangle.cpp \
353         detail/RangeCommon.cpp \
354         detail/RangeSse42.cpp \
355         EscapeTables.cpp \
356         Format.cpp \
357         FormatTables.cpp \
358         StringBase.cpp \
359         String.cpp \
360         Unicode.cpp
361
362 libfolly_la_SOURCES = \
363         Bits.cpp \
364         Checksum.cpp \
365         detail/CacheLocality.cpp \
366         dynamic.cpp \
367         File.cpp \
368         FileUtil.cpp \
369         FingerprintTables.cpp \
370         futures/Barrier.cpp \
371         futures/Future.cpp \
372         futures/InlineExecutor.cpp \
373         futures/ManualExecutor.cpp \
374         futures/QueuedImmediateExecutor.cpp \
375         futures/ThreadWheelTimekeeper.cpp \
376         detail/Futex.cpp \
377         detail/StaticSingletonManager.cpp \
378         detail/ThreadLocalDetail.cpp \
379         GroupVarint.cpp \
380         GroupVarintTables.cpp \
381         IPAddress.cpp \
382         IPAddressV4.cpp \
383         IPAddressV6.cpp \
384         LifoSem.cpp \
385         io/Compression.cpp \
386         io/Cursor.cpp \
387         io/IOBuf.cpp \
388         io/IOBufQueue.cpp \
389         io/RecordIO.cpp \
390         io/ShutdownSocketSet.cpp \
391         io/async/AsyncPipe.cpp \
392         io/async/AsyncTimeout.cpp \
393         io/async/AsyncUDPSocket.cpp \
394         io/async/AsyncServerSocket.cpp \
395         io/async/AsyncSignalHandler.cpp \
396         io/async/AsyncSocket.cpp \
397         io/async/AsyncSSLSocket.cpp \
398         io/async/EventBase.cpp \
399         io/async/EventBaseLocal.cpp \
400         io/async/EventBaseManager.cpp \
401         io/async/EventHandler.cpp \
402         io/async/Request.cpp \
403         io/async/SSLContext.cpp \
404         io/async/ScopedEventBaseThread.cpp \
405         io/async/HHWheelTimer.cpp \
406         io/async/test/SocketPair.cpp \
407         io/async/test/TimeUtil.cpp \
408         io/async/ssl/OpenSSLUtils.cpp \
409         io/async/ssl/SSLErrors.cpp \
410         json.cpp \
411         detail/MemoryIdler.cpp \
412         detail/SocketFastOpen.cpp \
413         MacAddress.cpp \
414         MemoryMapping.cpp \
415         portability/Dirent.cpp \
416         portability/Environment.cpp \
417         portability/Fcntl.cpp \
418         portability/Libgen.cpp \
419         portability/Malloc.cpp \
420         portability/Memory.cpp \
421         portability/Sockets.cpp \
422         portability/Stdio.cpp \
423         portability/Stdlib.cpp \
424         portability/String.cpp \
425         portability/SysFile.cpp \
426         portability/SysMman.cpp \
427         portability/SysResource.cpp \
428         portability/SysStat.cpp \
429         portability/SysTime.cpp \
430         portability/SysUio.cpp \
431         portability/Time.cpp \
432         portability/Unistd.cpp \
433         Random.cpp \
434         SafeAssert.cpp \
435         SharedMutex.cpp \
436         MicroLock.cpp \
437         Singleton.cpp \
438         SocketAddress.cpp \
439         SpookyHashV1.cpp \
440         SpookyHashV2.cpp \
441         ssl/OpenSSLHash.cpp \
442         stats/Instantiations.cpp \
443         Subprocess.cpp \
444         ThreadCachedArena.cpp \
445         TimeoutQueue.cpp \
446         Uri.cpp \
447         Version.cpp \
448         experimental/bser/Dump.cpp \
449         experimental/bser/Load.cpp \
450         experimental/DynamicParser.cpp \
451         experimental/FunctionScheduler.cpp \
452         experimental/io/FsUtil.cpp \
453         experimental/JSONSchema.cpp \
454         experimental/NestedCommandLineApp.cpp \
455         experimental/ProgramOptions.cpp \
456         experimental/Select64.cpp \
457         experimental/TestUtil.cpp
458
459 if HAVE_LINUX
460 nobase_follyinclude_HEADERS += \
461         experimental/io/HugePages.h
462 libfolly_la_SOURCES += \
463         experimental/io/HugePages.cpp
464 endif
465
466 if !HAVE_WEAK_SYMBOLS
467 libfollybase_la_SOURCES += detail/MallocImpl.cpp
468 endif
469
470 if !HAVE_BITS_FUNCTEXCEPT_H
471 libfollybase_la_SOURCES += detail/FunctionalExcept.cpp
472 endif
473
474 if HAVE_BOOST_CONTEXT
475 nobase_follyinclude_HEADERS += \
476         fibers/AddTasks.h \
477         fibers/AddTasks-inl.h \
478         fibers/Baton.h \
479         fibers/Baton-inl.h \
480         fibers/BoostContextCompatibility.h \
481         fibers/EventBaseLoopController.h \
482         fibers/EventBaseLoopController-inl.h \
483         fibers/Fiber.h \
484         fibers/Fiber-inl.h \
485         fibers/FiberManager.h \
486         fibers/FiberManager-inl.h \
487         fibers/FiberManagerMap.h \
488         fibers/ForEach.h \
489         fibers/ForEach-inl.h \
490         fibers/GenericBaton.h \
491         fibers/GuardPageAllocator.h \
492         fibers/LoopController.h \
493         fibers/Promise.h \
494         fibers/Promise-inl.h \
495         fibers/SimpleLoopController.h \
496         fibers/TimedMutex.h \
497         fibers/TimedMutex-inl.h \
498         fibers/TimeoutController.h \
499         fibers/traits.h \
500         fibers/WhenN.h \
501         fibers/WhenN-inl.h
502
503 libfolly_la_SOURCES += \
504         fibers/Baton.cpp \
505         fibers/Fiber.cpp \
506         fibers/FiberManager.cpp \
507         fibers/FiberManagerMap.cpp \
508         fibers/GuardPageAllocator.cpp \
509         fibers/TimeoutController.cpp
510 endif
511
512 libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
513
514 libfolly_la_LIBADD = libfollybase.la
515 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
516
517 FingerprintTables.cpp: generate_fingerprint_tables
518         ./generate_fingerprint_tables
519 CLEANFILES += FingerprintTables.cpp
520
521 libfollybenchmark_la_SOURCES = Benchmark.cpp
522 libfollybenchmark_la_LIBADD = libfolly.la
523 libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)