@@ -55,13 +55,16 @@ endif
5555include makefile_include.mk
5656
5757ifneq ($(findstring -DLTM_DESC,$(LTC_CFLAGS)),)
58- LTC_MPI_PROVIDERS += -ltommath
58+ LTC_MPI_PROVIDERS_CFLAGS += -DLTM_DESC
59+ LTC_MPI_PROVIDERS_LIBS += -ltommath
5960endif
6061ifneq ($(findstring -DTFM_DESC,$(LTC_CFLAGS)),)
61- LTC_MPI_PROVIDERS += -ltfm
62+ LTC_MPI_PROVIDERS_CFLAGS += -DTFM_DESC
63+ LTC_MPI_PROVIDERS_LIBS += -ltfm
6264endif
6365ifneq ($(findstring -DGMP_DESC,$(LTC_CFLAGS)),)
64- LTC_MPI_PROVIDERS += -lgmp
66+ LTC_MPI_PROVIDERS_CFLAGS += -DGMP_DESC
67+ LTC_MPI_PROVIDERS_LIBS += -lgmp
6568endif
6669
6770#ciphers come in two flavours... enc+dec and enc
@@ -90,7 +93,8 @@ $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
9093install: $(call print-help,install,Installs the library + headers + pkg-config file) .common_install
9194 sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' -e 's,@CMAKE_INSTALL_LIBDIR@,lib,' \
9295 -e 's,@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@,include/tomcrypt,' \
93- -e 's,@MPI_PROVIDERS@,$(LTC_MPI_PROVIDERS),' libtomcrypt.pc.in > libtomcrypt.pc
96+ -e 's,@MPI_PROVIDERS_LIBS@,$(LTC_MPI_PROVIDERS_LIBS),' \
97+ -e 's,@MPI_PROVIDERS_CFLAGS@,$(LTC_MPI_PROVIDERS_CFLAGS),' libtomcrypt.pc.in > libtomcrypt.pc
9498 install -p -d $(DESTDIR)$(LIBPATH)/pkgconfig
9599 install -p -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
96100
0 commit comments