Drop the boost dependency from Traits.h and FBVector.h
[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/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/TryDetail.h \
81         detail/TurnSequencer.h \
82         detail/UncaughtExceptionCounter.h \
83         Demangle.h \
84         DiscriminatedPtr.h \
85         DynamicConverter.h \
86         dynamic.h \
87         dynamic-inl.h \
88         Enumerate.h \
89         EvictingCacheMap.h \
90         Exception.h \
91         ExceptionString.h \
92         ExceptionWrapper.h \
93         Executor.h \
94         Expected.h \
95         experimental/AsymmetricMemoryBarrier.h \
96         experimental/AutoTimer.h \
97         experimental/Bits.h \
98         experimental/BitVectorCoding.h \
99         experimental/DynamicParser.h \
100         experimental/DynamicParser-inl.h \
101         experimental/ExecutionObserver.h \
102         experimental/EliasFanoCoding.h \
103         experimental/EventCount.h \
104         experimental/Instructions.h \
105         experimental/bser/Bser.h \
106         experimental/FunctionScheduler.h \
107         experimental/FutureDAG.h \
108         experimental/io/FsUtil.h \
109         experimental/JemallocNodumpAllocator.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/EventBaseThread.h \
226         io/async/EventFDWrapper.h \
227         io/async/EventHandler.h \
228         io/async/EventUtil.h \
229         io/async/NotificationQueue.h \
230         io/async/HHWheelTimer.h \
231         io/async/ssl/OpenSSLPtrTypes.h \
232         io/async/ssl/OpenSSLUtils.h \
233         io/async/ssl/SSLErrors.h \
234         io/async/ssl/TLSDefinitions.h \
235         io/async/Request.h \
236         io/async/SSLContext.h \
237         io/async/ScopedEventBaseThread.h \
238         io/async/TimeoutManager.h \
239         io/async/VirtualEventBase.h \
240         io/async/WriteChainAsyncTransportWrapper.h \
241         io/async/test/AsyncSSLSocketTest.h \
242         io/async/test/BlockingSocket.h \
243         io/async/test/MockAsyncSocket.h \
244         io/async/test/MockAsyncServerSocket.h \
245         io/async/test/MockAsyncSSLSocket.h \
246         io/async/test/MockAsyncTransport.h \
247         io/async/test/MockAsyncUDPSocket.h \
248         io/async/test/MockTimeoutManager.h \
249         io/async/test/ScopedBoundPort.h \
250         io/async/test/SocketPair.h \
251         io/async/test/TimeUtil.h \
252         io/async/test/UndelayedDestruction.h \
253         io/async/test/Util.h \
254         json.h \
255         Lazy.h \
256         LifoSem.h \
257         Likely.h \
258         LockTraits.h \
259         LockTraitsBoost.h \
260         Logging.h \
261         MacAddress.h \
262         MallctlHelper.h \
263         Malloc.h \
264         MapUtil.h \
265         Math.h \
266         Memory.h \
267         MemoryMapping.h \
268         MicroSpinLock.h \
269         MicroLock.h \
270         MoveWrapper.h \
271         MPMCPipeline.h \
272         MPMCQueue.h \
273         Optional.h \
274         PackedSyncPtr.h \
275         Padded.h \
276         Partial.h \
277         PicoSpinLock.h \
278         Portability.h \
279         portability/Asm.h \
280         portability/Atomic.h \
281         portability/BitsFunctexcept.h \
282         portability/Builtins.h \
283         portability/Config.h \
284         portability/Constexpr.h \
285         portability/Dirent.h \
286         portability/Environment.h \
287         portability/Event.h \
288         portability/Fcntl.h \
289         portability/GFlags.h \
290         portability/GMock.h \
291         portability/GTest.h \
292         portability/IOVec.h \
293         portability/Libgen.h \
294         portability/Malloc.h \
295         portability/Math.h \
296         portability/Memory.h \
297         portability/OpenSSL.h \
298         portability/PThread.h \
299         portability/Sockets.h \
300         portability/Stdio.h \
301         portability/Stdlib.h \
302         portability/String.h \
303         portability/Syslog.h \
304         portability/SysFile.h \
305         portability/SysMembarrier.h \
306         portability/SysMman.h \
307         portability/SysResource.h \
308         portability/SysStat.h \
309         portability/SysSyscall.h \
310         portability/SysTime.h \
311         portability/SysTypes.h \
312         portability/SysUio.h \
313         portability/Time.h \
314         portability/TypeTraits.h \
315         portability/Windows.h \
316         portability/Unistd.h \
317         Preprocessor.h \
318         ProducerConsumerQueue.h \
319         Random.h \
320         Random-inl.h \
321         Range.h \
322         RWSpinLock.h \
323         SafeAssert.h \
324         ScopeGuard.h \
325         SharedMutex.h \
326         Shell.h \
327         Singleton.h \
328         Singleton-inl.h \
329         SingletonThreadLocal.h \
330         SmallLocks.h \
331         small_vector.h \
332         SocketAddress.h \
333         sorted_vector_types.h \
334         SparseByteSet.h \
335         SpinLock.h \
336         SpookyHashV1.h \
337         SpookyHashV2.h \
338         ssl/OpenSSLHash.h \
339         ssl/OpenSSLVersionFinder.h \
340         ssl/SSLSession.h \
341         ssl/detail/SSLSessionImpl.h \
342         stats/BucketedTimeSeries-defs.h \
343         stats/BucketedTimeSeries.h \
344         stats/Histogram-defs.h \
345         stats/Histogram.h \
346         stats/MultiLevelTimeSeries-defs.h \
347         stats/MultiLevelTimeSeries.h \
348         stats/TimeseriesHistogram-defs.h \
349         stats/TimeseriesHistogram.h \
350         stop_watch.h \
351         String.h \
352         String-inl.h \
353         Subprocess.h \
354         Synchronized.h \
355         test/FBStringTestBenchmarks.cpp.h \
356         test/FBVectorTestBenchmarks.cpp.h \
357         test/function_benchmark/benchmark_impl.h \
358         test/function_benchmark/test_functions.h \
359         test/SynchronizedTestLib.h \
360         test/SynchronizedTestLib-inl.h \
361         test/TestUtils.h \
362         ThreadCachedArena.h \
363         ThreadCachedInt.h \
364         ThreadId.h \
365         ThreadLocal.h \
366         ThreadName.h \
367         TimeoutQueue.h \
368         TokenBucket.h \
369         tracing/StaticTracepoint.h \
370         Traits.h \
371         Try-inl.h \
372         Try.h \
373         Unicode.h \
374         Function.h \
375         UncaughtExceptions.h \
376         Unit.h \
377         Uri.h \
378         Uri-inl.h \
379         Utility.h \
380         Varint.h \
381         VersionCheck.h
382
383 FormatTables.cpp: build/generate_format_tables.py
384         $(PYTHON) build/generate_format_tables.py
385 CLEANFILES += FormatTables.cpp
386
387 EscapeTables.cpp: build/generate_escape_tables.py
388         $(PYTHON) build/generate_escape_tables.py
389 CLEANFILES += EscapeTables.cpp
390
391 GroupVarintTables.cpp: build/generate_varint_tables.py
392         $(PYTHON) build/generate_varint_tables.py
393 CLEANFILES += GroupVarintTables.cpp
394
395 libfollybasesse42_la_SOURCES = \
396         detail/RangeSse42.cpp
397
398 libfollybase_la_SOURCES = \
399         Conv.cpp \
400         Demangle.cpp \
401         detail/RangeCommon.cpp \
402         EscapeTables.cpp \
403         Format.cpp \
404         FormatTables.cpp \
405         MallctlHelper.cpp \
406         portability/BitsFunctexcept.cpp \
407         StringBase.cpp \
408         String.cpp \
409         Unicode.cpp
410
411 libfolly_la_SOURCES = \
412         Assume.cpp \
413         Bits.cpp \
414         Checksum.cpp \
415         ClockGettimeWrappers.cpp \
416         detail/CacheLocality.cpp \
417         detail/IPAddress.cpp \
418         dynamic.cpp \
419         ExceptionWrapper.cpp \
420         Executor.cpp \
421         File.cpp \
422         FileUtil.cpp \
423         FingerprintTables.cpp \
424         futures/Barrier.cpp \
425         futures/Future.cpp \
426         futures/InlineExecutor.cpp \
427         futures/ManualExecutor.cpp \
428         futures/QueuedImmediateExecutor.cpp \
429         futures/ThreadWheelTimekeeper.cpp \
430         detail/Futex.cpp \
431         detail/StaticSingletonManager.cpp \
432         detail/ThreadLocalDetail.cpp \
433         GroupVarint.cpp \
434         GroupVarintTables.cpp \
435         IPAddress.cpp \
436         IPAddressV4.cpp \
437         IPAddressV6.cpp \
438         LifoSem.cpp \
439         init/Init.cpp \
440         io/Compression.cpp \
441         io/Cursor.cpp \
442         io/IOBuf.cpp \
443         io/IOBufQueue.cpp \
444         io/RecordIO.cpp \
445         io/ShutdownSocketSet.cpp \
446         io/async/AsyncPipe.cpp \
447         io/async/AsyncTimeout.cpp \
448         io/async/AsyncUDPSocket.cpp \
449         io/async/AsyncServerSocket.cpp \
450         io/async/AsyncSignalHandler.cpp \
451         io/async/AsyncSocket.cpp \
452         io/async/AsyncSSLSocket.cpp \
453         io/async/EventBase.cpp \
454         io/async/EventBaseLocal.cpp \
455         io/async/EventBaseManager.cpp \
456         io/async/EventBaseThread.cpp \
457         io/async/EventHandler.cpp \
458         io/async/Request.cpp \
459         io/async/SSLContext.cpp \
460         io/async/ScopedEventBaseThread.cpp \
461         io/async/VirtualEventBase.cpp \
462         io/async/HHWheelTimer.cpp \
463         io/async/TimeoutManager.cpp \
464         io/async/test/ScopedBoundPort.cpp \
465         io/async/test/SocketPair.cpp \
466         io/async/test/TimeUtil.cpp \
467         io/async/ssl/OpenSSLUtils.cpp \
468         io/async/ssl/SSLErrors.cpp \
469         json.cpp \
470         detail/MemoryIdler.cpp \
471         detail/SocketFastOpen.cpp \
472         MacAddress.cpp \
473         MemoryMapping.cpp \
474         portability/Dirent.cpp \
475         portability/Environment.cpp \
476         portability/Fcntl.cpp \
477         portability/Libgen.cpp \
478         portability/Malloc.cpp \
479         portability/Memory.cpp \
480         portability/OpenSSL.cpp \
481         portability/Sockets.cpp \
482         portability/Stdio.cpp \
483         portability/Stdlib.cpp \
484         portability/String.cpp \
485         portability/SysFile.cpp \
486         portability/SysMembarrier.cpp \
487         portability/SysMman.cpp \
488         portability/SysResource.cpp \
489         portability/SysStat.cpp \
490         portability/SysTime.cpp \
491         portability/SysUio.cpp \
492         portability/Time.cpp \
493         portability/Unistd.cpp \
494         Random.cpp \
495         SafeAssert.cpp \
496         ScopeGuard.cpp \
497         SharedMutex.cpp \
498         Shell.cpp \
499         MicroLock.cpp \
500         Singleton.cpp \
501         SocketAddress.cpp \
502         SpookyHashV1.cpp \
503         SpookyHashV2.cpp \
504         ssl/OpenSSLHash.cpp \
505         ssl/detail/SSLSessionImpl.cpp \
506         stats/Instantiations.cpp \
507         Subprocess.cpp \
508         ThreadCachedArena.cpp \
509         TimeoutQueue.cpp \
510         Uri.cpp \
511         Version.cpp \
512         experimental/AsymmetricMemoryBarrier.cpp \
513         experimental/bser/Dump.cpp \
514         experimental/bser/Load.cpp \
515         experimental/DynamicParser.cpp \
516         experimental/FunctionScheduler.cpp \
517         experimental/io/FsUtil.cpp \
518         experimental/JemallocNodumpAllocator.cpp \
519         experimental/JSONSchema.cpp \
520         experimental/NestedCommandLineApp.cpp \
521         experimental/observer/detail/Core.cpp \
522         experimental/observer/detail/ObserverManager.cpp \
523         experimental/ProgramOptions.cpp \
524         experimental/Select64.cpp \
525         experimental/TestUtil.cpp
526
527 if HAVE_LINUX
528 nobase_follyinclude_HEADERS += \
529         experimental/io/HugePages.h
530 libfolly_la_SOURCES += \
531         experimental/io/HugePages.cpp
532 endif
533
534 if !HAVE_WEAK_SYMBOLS
535 libfollybase_la_SOURCES += detail/MallocImpl.cpp
536 endif
537
538 if HAVE_BOOST_CONTEXT
539 nobase_follyinclude_HEADERS += \
540         fibers/AddTasks.h \
541         fibers/AddTasks-inl.h \
542         fibers/AtomicBatchDispatcher.h \
543         fibers/AtomicBatchDispatcher-inl.h \
544         fibers/Baton.h \
545         fibers/Baton-inl.h \
546         fibers/BatchDispatcher.h \
547         fibers/BoostContextCompatibility.h \
548         fibers/EventBaseLoopController.h \
549         fibers/EventBaseLoopController-inl.h \
550         fibers/Fiber.h \
551         fibers/Fiber-inl.h \
552         fibers/FiberManager.h \
553         fibers/FiberManager-inl.h \
554         fibers/FiberManagerInternal.h \
555         fibers/FiberManagerInternal-inl.h \
556         fibers/FiberManagerMap.h \
557         fibers/ForEach.h \
558         fibers/ForEach-inl.h \
559         fibers/GenericBaton.h \
560         fibers/GuardPageAllocator.h \
561         fibers/LoopController.h \
562         fibers/Promise.h \
563         fibers/Promise-inl.h \
564         fibers/Semaphore.h \
565         fibers/SimpleLoopController.h \
566         fibers/TimedMutex.h \
567         fibers/TimedMutex-inl.h \
568         fibers/TimeoutController.h \
569         fibers/traits.h \
570         fibers/WhenN.h \
571         fibers/WhenN-inl.h
572
573 libfolly_la_SOURCES += \
574         fibers/Baton.cpp \
575         fibers/Fiber.cpp \
576         fibers/FiberManager.cpp \
577         fibers/FiberManagerMap.cpp \
578         fibers/GuardPageAllocator.cpp \
579         fibers/Semaphore.cpp \
580         fibers/TimeoutController.cpp
581 endif
582
583 libfollybasesse42_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
584 libfollybasesse42_la_CXXFLAGS = -msse4.2
585
586 libfollybase_la_LIBADD = libfollybasesse42.la
587 libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
588
589 libfolly_la_LIBADD = libfollybase.la
590 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
591
592 FingerprintTables.cpp: generate_fingerprint_tables
593         ./generate_fingerprint_tables
594 CLEANFILES += FingerprintTables.cpp
595
596 libfollybenchmark_la_SOURCES = Benchmark.cpp
597 libfollybenchmark_la_LIBADD = libfolly.la
598 libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
599
600 # install pkg-config metadata file
601 pkgconfigdir = $(libdir)/pkgconfig
602 nodist_pkgconfig_DATA = libfolly.pc