Jamfile 1.8 KB

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