Jamfile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. <define>RTC_ENABLE_MEDIA=0
  12. <define>RTC_ENABLE_WEBSOCKET=0
  13. <library>/libdatachannel//usrsctp
  14. <library>/libdatachannel//juice
  15. <library>/libdatachannel//plog
  16. : # default build
  17. <link>static
  18. : # usage requirements
  19. <include>./include
  20. <library>/libdatachannel//plog
  21. <cxxflags>-pthread
  22. <toolset>gcc:<cxxflags>"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
  23. <toolset>clang:<cxxflags>"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
  24. ;
  25. feature gnutls : off on : composite propagated ;
  26. feature.compose <gnutls>off
  27. : <define>USE_GNUTLS=0 ;
  28. feature.compose <gnutls>on
  29. : <define>USE_GNUTLS=1 ;
  30. alias plog
  31. : # no sources
  32. : # no build requirements
  33. : # no default build
  34. : # usage requirements
  35. <include>./deps/plog/include
  36. ;
  37. alias usrsctp
  38. : # no sources
  39. : # no build requirements
  40. : # no default build
  41. : # usage requirements
  42. <include>./deps/usrsctp/usrsctplib
  43. <library>libusrsctp.a
  44. ;
  45. alias juice
  46. : # no sources
  47. : # no build requirements
  48. : # no default build
  49. : # usage requirements
  50. <include>./deps/libjuice/include
  51. <library>libjuice.a
  52. ;
  53. make libusrsctp.a : : @make_libusrsctp ;
  54. actions make_libusrsctp
  55. {
  56. (cd $(CWD)/deps/usrsctp && \
  57. ./bootstrap && \
  58. ./configure --enable-static --disable-debug CFLAGS="-fPIC -Wno-address-of-packed-member" && \
  59. make)
  60. cp $(CWD)/deps/usrsctp/usrsctplib/.libs/libusrsctp.a $(<)
  61. }
  62. make libjuice.a : : @make_libjuice ;
  63. rule make_libjuice ( targets * : sources * : properties * )
  64. {
  65. if <crypto>gnutls in $(properties)
  66. {
  67. MAKEOPTS on $(targets) = "USE_NETTLE=1" ;
  68. }
  69. else
  70. {
  71. MAKEOPTS on $(targets) = "USE_NETTLE=0" ;
  72. }
  73. }
  74. actions make_libjuice
  75. {
  76. (cd $(CWD)/deps/libjuice && make $(MAKEOPTS))
  77. cp $(CWD)/deps/libjuice/libjuice.a $(<)
  78. }