Skip to content

Commit 8076d86

Browse files
committed
Fix missing include paths of ltm and tfm
Default include paths of ltm and tfm have changed. Try to get include paths from pkg-config. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent e1a52a5 commit 8076d86

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

makefile_include.mk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ endif
5555

5656
ifndef EXTRALIBS
5757
ifneq ($(shell echo $(CFLAGS) | grep USE_LTM),)
58-
EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config libtommath --libs)
58+
EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs libtommath)
5959
else
6060
ifneq ($(shell echo $(CFLAGS) | grep USE_TFM),)
61-
EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config tomsfastmath --libs)
61+
EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs tomsfastmath)
6262
endif
6363
endif
6464
endif
@@ -76,6 +76,12 @@ endef
7676
# by giving them as a parameter to make:
7777
# make CFLAGS="-I./src/headers/ -DLTC_SOURCE ..." ...
7878
#
79+
ifneq ($(shell echo $(CFLAGS) | grep LTM_DESC),)
80+
LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I libtommath)
81+
endif
82+
ifneq ($(shell echo $(CFLAGS) | grep TFM_DESC),)
83+
LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I tomsfastmath)
84+
endif
7985
LTC_CFLAGS += -I./src/headers/ -DLTC_SOURCE -Wall -Wsign-compare -Wshadow
8086

8187
ifdef OLD_GCC

0 commit comments

Comments
 (0)