Jamfile 1.8 KB

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