import feature : feature ; project libdatachannel ; path-constant CWD : . ; lib libdatachannel : # sources [ glob ./src/*.cpp ] : # requirements 17 ./include/rtc USE_JUICE=1 RTC_ENABLE_MEDIA=0 RTC_ENABLE_WEBSOCKET=0 /libdatachannel//usrsctp /libdatachannel//juice /libdatachannel//plog : # default build static : # usage requirements ./include /libdatachannel//plog -pthread gcc:"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable" clang:"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable" ; feature gnutls : off on : composite propagated ; feature.compose off : USE_GNUTLS=0 ; feature.compose on : USE_GNUTLS=1 ; alias plog : # no sources : # no build requirements : # no default build : # usage requirements ./deps/plog/include ; alias usrsctp : # no sources : # no build requirements : # no default build : # usage requirements ./deps/usrsctp/usrsctplib libusrsctp.a ; alias juice : # no sources : # no build requirements : # no default build : # usage requirements ./deps/libjuice/include 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 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 $(<) }