include.am 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. noinst_LIBRARIES += \
  2. src/common/libor.a \
  3. src/common/libor-crypto.a \
  4. src/common/libor-event.a
  5. if UNITTESTS_ENABLED
  6. noinst_LIBRARIES += \
  7. src/common/libor-testing.a \
  8. src/common/libor-crypto-testing.a \
  9. src/common/libor-event-testing.a
  10. endif
  11. EXTRA_DIST+= \
  12. src/common/common_sha1.i \
  13. src/common/Makefile.nmake
  14. #CFLAGS = -Wall -Wpointer-arith -O2
  15. AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common
  16. if USE_OPENBSD_MALLOC
  17. libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
  18. else
  19. libor_extra_source=
  20. endif
  21. if USE_MEMPOOLS
  22. libor_mempool_source=src/common/mempool.c
  23. libor_mempool_header=src/common/mempool.h
  24. else
  25. libor_mempool_source=
  26. libor_mempool_header=
  27. endif
  28. src_common_libcurve25519_donna_a_CFLAGS=
  29. if BUILD_CURVE25519_DONNA
  30. src_common_libcurve25519_donna_a_SOURCES=\
  31. src/ext/curve25519_donna/curve25519-donna.c
  32. src_common_libcurve25519_donna_a_CFLAGS+=\
  33. @F_OMIT_FRAME_POINTER@
  34. noinst_LIBRARIES+=src/common/libcurve25519_donna.a
  35. LIBDONNA=src/common/libcurve25519_donna.a
  36. else
  37. if BUILD_CURVE25519_DONNA_C64
  38. src_common_libcurve25519_donna_a_SOURCES=\
  39. src/ext/curve25519_donna/curve25519-donna-c64.c
  40. noinst_LIBRARIES+=src/common/libcurve25519_donna.a
  41. LIBDONNA=src/common/libcurve25519_donna.a
  42. else
  43. LIBDONNA=
  44. endif
  45. endif
  46. if CURVE25519_ENABLED
  47. libcrypto_extra_source=src/common/crypto_curve25519.c
  48. endif
  49. LIBOR_A_SOURCES = \
  50. src/common/address.c \
  51. src/common/backtrace.c \
  52. src/common/compat.c \
  53. src/common/container.c \
  54. src/common/di_ops.c \
  55. src/common/log.c \
  56. src/common/memarea.c \
  57. src/common/util.c \
  58. src/common/util_codedigest.c \
  59. src/common/util_process.c \
  60. src/common/sandbox.c \
  61. src/ext/csiphash.c \
  62. $(libor_extra_source) \
  63. $(libor_mempool_source)
  64. LIBOR_CRYPTO_A_SOURCES = \
  65. src/common/aes.c \
  66. src/common/crypto.c \
  67. src/common/crypto_format.c \
  68. src/common/torgzip.c \
  69. src/common/tortls.c \
  70. $(libcrypto_extra_source)
  71. LIBOR_EVENT_A_SOURCES = \
  72. src/common/compat_libevent.c \
  73. src/common/procmon.c
  74. src_common_libor_a_SOURCES = $(LIBOR_A_SOURCES)
  75. src_common_libor_crypto_a_SOURCES = $(LIBOR_CRYPTO_A_SOURCES)
  76. src_common_libor_event_a_SOURCES = $(LIBOR_EVENT_A_SOURCES)
  77. src_common_libor_testing_a_SOURCES = $(LIBOR_A_SOURCES)
  78. src_common_libor_crypto_testing_a_SOURCES = $(LIBOR_CRYPTO_A_SOURCES)
  79. src_common_libor_event_testing_a_SOURCES = $(LIBOR_EVENT_A_SOURCES)
  80. src_common_libor_testing_a_CPPFLAGS = -DTOR_UNIT_TESTS $(AM_CPPFLAGS)
  81. src_common_libor_crypto_testing_a_CPPFLAGS = -DTOR_UNIT_TESTS $(AM_CPPFLAGS)
  82. src_common_libor_event_testing_a_CPPFLAGS = -DTOR_UNIT_TESTS $(AM_CPPFLAGS)
  83. src_common_libor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  84. src_common_libor_crypto_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  85. src_common_libor_event_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  86. COMMONHEADERS = \
  87. src/common/address.h \
  88. src/common/backtrace.h \
  89. src/common/aes.h \
  90. src/common/ciphers.inc \
  91. src/common/compat.h \
  92. src/common/compat_libevent.h \
  93. src/common/container.h \
  94. src/common/crypto.h \
  95. src/common/crypto_curve25519.h \
  96. src/common/di_ops.h \
  97. src/common/memarea.h \
  98. src/common/linux_syscalls.inc \
  99. src/common/procmon.h \
  100. src/common/sandbox.h \
  101. src/common/testsupport.h \
  102. src/common/torgzip.h \
  103. src/common/torint.h \
  104. src/common/torlog.h \
  105. src/common/tortls.h \
  106. src/common/util.h \
  107. src/common/util_process.h \
  108. $(libor_mempool_header)
  109. noinst_HEADERS+= $(COMMONHEADERS)
  110. DISTCLEANFILES+= src/common/common_sha1.i
  111. src/common/common_sha1.i: $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(COMMONHEADERS)
  112. $(AM_V_GEN)if test "@SHA1SUM@" != none; then \
  113. (cd "$(srcdir)" && "@SHA1SUM@" $(src_common_libor_SOURCES) $(src_common_libor_crypto_a_SOURCES) $(COMMONHEADERS)) | "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > $@; \
  114. elif test "@OPENSSL@" != none; then \
  115. (cd "$(srcdir)" && "@OPENSSL@" sha1 $(src_common_libor_SOURCES) $(src_Common_libor_crypto_a_SOURCES) $(COMMONHEADERS)) | "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > $@; \
  116. else \
  117. rm $@; \
  118. touch $@; \
  119. fi
  120. src/common/util_codedigest.o: src/common/common_sha1.i