include.am 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. TESTS+= src/test/test
  2. noinst_PROGRAMS+= src/test/test src/test/test-child src/test/bench
  3. src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
  4. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  5. -DBINDIR="\"$(bindir)\"" \
  6. -I"$(top_srcdir)/src/or" -I"$(top_srcdir)/src/ext"
  7. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  8. # This seems to matter nowhere but on Windows, but I assure you that it
  9. # matters a lot there, and is quite hard to debug if you forget to do it.
  10. src_test_test_SOURCES = \
  11. src/test/test.c \
  12. src/test/test_addr.c \
  13. src/test/test_cell_formats.c \
  14. src/test/test_containers.c \
  15. src/test/test_crypto.c \
  16. src/test/test_data.c \
  17. src/test/test_dir.c \
  18. src/test/test_introduce.c \
  19. src/test/test_microdesc.c \
  20. src/test/test_pt.c \
  21. src/test/test_replay.c \
  22. src/test/test_util.c \
  23. src/test/test_config.c \
  24. src/ext/tinytest.c
  25. src_test_test_CPPFLAGS= $(src_test_AM_CPPFLAGS)
  26. src_test_bench_SOURCES = \
  27. src/test/bench.c
  28. src_test_bench_CPPFLAGS= $(src_test_AM_CPPFLAGS)
  29. src_test_test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
  30. @TOR_LDFLAGS_libevent@
  31. src_test_test_LDADD = src/or/libtor.a src/common/libor.a \
  32. src/common/libor-crypto.a $(LIBDONNA) \
  33. src/common/libor-event.a \
  34. @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
  35. @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
  36. src_test_bench_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
  37. @TOR_LDFLAGS_libevent@
  38. src_test_bench_LDADD = src/or/libtor.a src/common/libor.a \
  39. src/common/libor-crypto.a $(LIBDONNA) \
  40. src/common/libor-event.a \
  41. @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
  42. @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
  43. noinst_HEADERS+= \
  44. src/test/test.h
  45. if CURVE25519_ENABLED
  46. noinst_PROGRAMS+= src/test/test-ntor-cl
  47. src_test_test_ntor_cl_SOURCES = src/test/test_ntor_cl.c
  48. src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
  49. src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
  50. src/common/libor-crypto.a $(LIBDONNA) \
  51. @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
  52. @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
  53. src_test_test_ntor_cl_AM_CPPFLAGS = \
  54. -I"$(top_srcdir)/src/or"
  55. endif