Use nettle for libjuice only if using GnuTLS

This commit is contained in:
Paul-Louis Ageneau
2020-01-21 13:51:02 +01:00
parent ed68ba5402
commit 2a6c10269e
4 changed files with 18 additions and 4 deletions

View File

@ -30,7 +30,9 @@ ifneq ($(USE_JUICE), 0)
CPPFLAGS+=-DUSE_JUICE=1
INCLUDES+=-I$(JUICE_DIR)/include
LOCALLIBS+=libjuice.a
ifneq ($(USE_GNUTLS), 0)
LIBS+=nettle
endif
else
CPPFLAGS+=-DUSE_JUICE=0
LIBS+=glib-2.0 gobject-2.0 nice
@ -48,7 +50,7 @@ src/%.o: src/%.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -MMD -MP -o $@ -c $<
test/%.o: test/%.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -MMD -MP -o $@ -c $<
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -Iinclude -Isrc -MMD -MP -o $@ -c $<
-include $(subst .cpp,.d,$(SRCS))
@ -70,11 +72,13 @@ dist-clean: clean
-$(RM) $(NAME).a
-$(RM) $(NAME).so
-$(RM) libusrsctp.a
-$(RM) libjuice.a
-$(RM) tests
-$(RM) include/*~
-$(RM) src/*~
-$(RM) test/*~
-cd $(USRSCTP_DIR) && make clean
-cd $(JUICE_DIR) && make clean
libusrsctp.a:
cd $(USRSCTP_DIR) && \
@ -84,6 +88,10 @@ libusrsctp.a:
cp $(USRSCTP_DIR)/usrsctplib/.libs/libusrsctp.a .
libjuice.a:
cd $(JUICE_DIR) && make
ifneq ($(USE_GNUTLS), 0)
cd $(JUICE_DIR) && make USE_NETTLE=1
else
cd $(JUICE_DIR) && make USE_NETTLE=0
endif
cp $(JUICE_DIR)/libjuice.a .