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