include.am 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. noinst_LIBRARIES += \
  2. src/common/libor.a \
  3. src/common/libor-ctime.a \
  4. src/common/libor-crypto.a \
  5. src/common/libor-event.a
  6. if UNITTESTS_ENABLED
  7. noinst_LIBRARIES += \
  8. src/common/libor-testing.a \
  9. src/common/libor-ctime-testing.a \
  10. src/common/libor-crypto-testing.a \
  11. src/common/libor-event-testing.a
  12. endif
  13. EXTRA_DIST += src/common/Makefile.nmake
  14. #CFLAGS = -Wall -Wpointer-arith -O2
  15. AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel
  16. if USE_OPENBSD_MALLOC
  17. libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
  18. else
  19. libor_extra_source=
  20. endif
  21. src_common_libcurve25519_donna_a_CFLAGS=
  22. if BUILD_CURVE25519_DONNA
  23. src_common_libcurve25519_donna_a_SOURCES=\
  24. src/ext/curve25519_donna/curve25519-donna.c
  25. # See bug 13538 -- this code is known to have signed overflow issues.
  26. src_common_libcurve25519_donna_a_CFLAGS+=\
  27. @F_OMIT_FRAME_POINTER@ @CFLAGS_CONSTTIME@
  28. noinst_LIBRARIES+=src/common/libcurve25519_donna.a
  29. LIBDONNA=src/common/libcurve25519_donna.a
  30. else
  31. if BUILD_CURVE25519_DONNA_C64
  32. src_common_libcurve25519_donna_a_CFLAGS+=@CFLAGS_CONSTTIME@
  33. src_common_libcurve25519_donna_a_SOURCES=\
  34. src/ext/curve25519_donna/curve25519-donna-c64.c
  35. noinst_LIBRARIES+=src/common/libcurve25519_donna.a
  36. LIBDONNA=src/common/libcurve25519_donna.a
  37. else
  38. LIBDONNA=
  39. endif
  40. endif
  41. LIBDONNA += $(LIBED25519_REF10)
  42. LIBDONNA += $(LIBED25519_DONNA)
  43. if THREADS_PTHREADS
  44. threads_impl_source=src/common/compat_pthreads.c
  45. endif
  46. if THREADS_WIN32
  47. threads_impl_source=src/common/compat_winthreads.c
  48. endif
  49. if BUILD_READPASSPHRASE_C
  50. readpassphrase_source=src/ext/readpassphrase.c
  51. else
  52. readpassphrase_source=
  53. endif
  54. if ADD_MULODI4
  55. mulodi4_source=src/ext/mulodi/mulodi4.c
  56. else
  57. mulodi4_source=
  58. endif
  59. LIBOR_CTIME_A_SRC = \
  60. $(mulodi4_source) \
  61. src/ext/csiphash.c \
  62. src/common/di_ops.c
  63. src_common_libor_ctime_a_SOURCES = $(LIBOR_CTIME_A_SRC)
  64. src_common_libor_ctime_testing_a_SOURCES = $(LIBOR_CTIME_A_SRC)
  65. src_common_libor_ctime_a_CFLAGS = @CFLAGS_CONSTTIME@
  66. src_common_libor_ctime_testing_a_CFLAGS = @CFLAGS_CONSTTIME@ $(TEST_CFLAGS)
  67. LIBOR_A_SRC = \
  68. src/common/address.c \
  69. src/common/backtrace.c \
  70. src/common/compat.c \
  71. src/common/compat_threads.c \
  72. src/common/compat_time.c \
  73. src/common/confline.c \
  74. src/common/container.c \
  75. src/common/log.c \
  76. src/common/memarea.c \
  77. src/common/pubsub.c \
  78. src/common/util.c \
  79. src/common/util_bug.c \
  80. src/common/util_format.c \
  81. src/common/util_process.c \
  82. src/common/sandbox.c \
  83. src/common/storagedir.c \
  84. src/common/workqueue.c \
  85. $(libor_extra_source) \
  86. $(threads_impl_source) \
  87. $(readpassphrase_source)
  88. if USE_RUST
  89. else
  90. LIBOR_A_SRC += src/common/compat_rust.c
  91. endif
  92. src/common/src_common_libor_testing_a-log.$(OBJEXT) \
  93. src/common/log.$(OBJEXT): micro-revision.i
  94. LIBOR_CRYPTO_A_SRC = \
  95. src/common/aes.c \
  96. src/common/compress.c \
  97. src/common/compress_lzma.c \
  98. src/common/compress_none.c \
  99. src/common/compress_zlib.c \
  100. src/common/compress_zstd.c \
  101. src/common/crypto.c \
  102. src/common/crypto_pwbox.c \
  103. src/common/crypto_s2k.c \
  104. src/common/crypto_format.c \
  105. src/common/tortls.c \
  106. src/common/crypto_curve25519.c \
  107. src/common/crypto_ed25519.c
  108. LIBOR_EVENT_A_SRC = \
  109. src/common/compat_libevent.c \
  110. src/common/procmon.c \
  111. src/common/timers.c \
  112. src/ext/timeouts/timeout.c
  113. src_common_libor_a_SOURCES = $(LIBOR_A_SRC)
  114. src_common_libor_crypto_a_SOURCES = $(LIBOR_CRYPTO_A_SRC)
  115. src_common_libor_event_a_SOURCES = $(LIBOR_EVENT_A_SRC)
  116. src_common_libor_testing_a_SOURCES = $(LIBOR_A_SRC)
  117. src_common_libor_crypto_testing_a_SOURCES = $(LIBOR_CRYPTO_A_SRC)
  118. src_common_libor_event_testing_a_SOURCES = $(LIBOR_EVENT_A_SRC)
  119. src_common_libor_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
  120. src_common_libor_crypto_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
  121. src_common_libor_event_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
  122. src_common_libor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  123. src_common_libor_crypto_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  124. src_common_libor_event_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  125. COMMONHEADERS = \
  126. src/common/address.h \
  127. src/common/backtrace.h \
  128. src/common/aes.h \
  129. src/common/ciphers.inc \
  130. src/common/compat.h \
  131. src/common/compat_libevent.h \
  132. src/common/compat_openssl.h \
  133. src/common/compat_rust.h \
  134. src/common/compat_threads.h \
  135. src/common/compat_time.h \
  136. src/common/compress.h \
  137. src/common/compress_lzma.h \
  138. src/common/compress_none.h \
  139. src/common/compress_zlib.h \
  140. src/common/compress_zstd.h \
  141. src/common/confline.h \
  142. src/common/container.h \
  143. src/common/crypto.h \
  144. src/common/crypto_curve25519.h \
  145. src/common/crypto_ed25519.h \
  146. src/common/crypto_format.h \
  147. src/common/crypto_pwbox.h \
  148. src/common/crypto_s2k.h \
  149. src/common/di_ops.h \
  150. src/common/handles.h \
  151. src/common/memarea.h \
  152. src/common/linux_syscalls.inc \
  153. src/common/procmon.h \
  154. src/common/pubsub.h \
  155. src/common/sandbox.h \
  156. src/common/storagedir.h \
  157. src/common/testsupport.h \
  158. src/common/timers.h \
  159. src/common/torint.h \
  160. src/common/torlog.h \
  161. src/common/tortls.h \
  162. src/common/util.h \
  163. src/common/util_bug.h \
  164. src/common/util_format.h \
  165. src/common/util_process.h \
  166. src/common/workqueue.h
  167. noinst_HEADERS+= $(COMMONHEADERS)