| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import feature : feature ;
- project libdatachannel ;
- path-constant CWD : . ;
- lib libdatachannel
- : # sources
- [ glob ./src/*.cpp ]
- : # requirements
- <cxxstd>17
- <include>./include/rtc
- <define>USE_JUICE=1
- <define>RTC_ENABLE_WEBSOCKET=0
- <library>/libdatachannel//usrsctp
- <library>/libdatachannel//juice
- <library>/libdatachannel//plog
- : # default build
- <link>static
- : # usage requirements
- <include>./include
- <library>/libdatachannel//plog
- <cxxflags>-pthread
- ;
- feature crypto : openssl gnutls : composite propagated ;
- feature.compose <crypto>openssl
- : <define>USE_GNUTLS=0 ;
- feature.compose <crypto>gnutls
- : <define>USE_GNUTLS=1 ;
- alias plog
- : # no sources
- : # no build requirements
- : # no default build
- : # usage requirements
- <include>./deps/plog/include
- ;
- alias usrsctp
- : # no sources
- : # no build requirements
- : # no default build
- : # usage requirements
- <include>./deps/usrsctp/usrsctplib
- <library>libusrsctp.a
- ;
- alias juice
- : # no sources
- : # no build requirements
- : # no default build
- : # usage requirements
- <include>./deps/libjuice/include
- <library>libjuice.a
- ;
- make libusrsctp.a : : @make_libusrsctp ;
- actions make_libusrsctp
- {
- (cd $(CWD)/deps/usrsctp && \
- ./bootstrap && \
- ./configure --enable-static --disable-debug CFLAGS="-fPIC -Wno-address-of-packed-member" && \
- make)
- cp $(CWD)/deps/usrsctp/usrsctplib/.libs/libusrsctp.a $(<)
- }
- make libjuice.a : : @make_libjuice ;
- rule make_libjuice ( targets * : sources * : properties * )
- {
- if <crypto>gnutls in $(properties)
- {
- MAKEOPTS on $(targets) = "USE_NETTLE=1" ;
- }
- else
- {
- MAKEOPTS on $(targets) = "USE_NETTLE=0" ;
- }
- }
- actions make_libjuice
- {
- (cd $(CWD)/deps/libjuice && make $(MAKEOPTS))
- cp $(CWD)/deps/libjuice/libjuice.a $(<)
- }
|