2
0

Jamfile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import feature : feature ;
  2. project libdatachannel ;
  3. path-constant CWD : . ;
  4. lib libdatachannel
  5. : # sources
  6. [ glob ./src/*.cpp ]
  7. : # requirements
  8. <cxxstd>17
  9. <include>./include/rtc
  10. <define>USE_JUICE=1
  11. <library>/libdatachannel//usrsctp
  12. <library>/libdatachannel//juice
  13. <library>/libdatachannel//plog
  14. : # default build
  15. <link>static
  16. : # usage requirements
  17. <include>./include
  18. <library>/libdatachannel//plog
  19. <cxxflags>-pthread
  20. ;
  21. feature crypto : openssl gnutls : composite propagated ;
  22. feature.compose <crypto>openssl
  23. : <define>USE_GNUTLS=0 ;
  24. feature.compose <crypto>gnutls
  25. : <define>USE_GNUTLS=1 ;
  26. alias plog
  27. : # no sources
  28. : # no build requirements
  29. : # no default build
  30. : # usage requirements
  31. <include>./deps/plog/include
  32. ;
  33. alias usrsctp
  34. : # no sources
  35. : # no build requirements
  36. : # no default build
  37. : # usage requirements
  38. <include>./deps/usrsctp/usrsctplib
  39. <library>libusrsctp.a
  40. ;
  41. alias juice
  42. : # no sources
  43. : # no build requirements
  44. : # no default build
  45. : # usage requirements
  46. <include>./deps/libjuice/include
  47. <library>libjuice.a
  48. ;
  49. make libusrsctp.a : : @make_libusrsctp ;
  50. actions make_libusrsctp
  51. {
  52. (cd $(CWD)/deps/usrsctp && \
  53. ./bootstrap && \
  54. ./configure --enable-static --disable-debug CFLAGS="-fPIC -Wno-address-of-packed-member" && \
  55. make)
  56. cp $(CWD)/deps/usrsctp/usrsctplib/.libs/libusrsctp.a $(<)
  57. }
  58. make libjuice.a : : @make_libjuice ;
  59. rule make_libjuice ( targets * : sources * : properties * )
  60. {
  61. if <crypto>gnutls in $(properties)
  62. {
  63. MAKEOPTS on $(targets) = "USE_NETTLE=1" ;
  64. }
  65. else
  66. {
  67. MAKEOPTS on $(targets) = "USE_NETTLE=0" ;
  68. }
  69. }
  70. actions make_libjuice
  71. {
  72. (cd $(CWD)/deps/libjuice && make $(MAKEOPTS))
  73. cp $(CWD)/deps/libjuice/libjuice.a $(<)
  74. }