build: Properly grab the libpcsclite cflags
We should be grabbing the include directory using pkg-config and not just the libs. Without this, the header file might not be found on all systems because it may not be in /usr/include but elsewhere in the system. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
This commit is contained in:
parent
9569315dea
commit
a1d7a9e3b7
1 changed files with 4 additions and 1 deletions
|
@ -1090,17 +1090,20 @@ endif
|
||||||
|
|
||||||
ifdef CONFIG_PCSC
|
ifdef CONFIG_PCSC
|
||||||
# PC/SC interface for smartcards (USIM, GSM SIM)
|
# PC/SC interface for smartcards (USIM, GSM SIM)
|
||||||
CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
|
CFLAGS += -DPCSC_FUNCS
|
||||||
OBJS += ../src/utils/pcsc_funcs.o
|
OBJS += ../src/utils/pcsc_funcs.o
|
||||||
ifdef CONFIG_NATIVE_WINDOWS
|
ifdef CONFIG_NATIVE_WINDOWS
|
||||||
#Once MinGW gets support for WinScard, -lwinscard could be used instead of the
|
#Once MinGW gets support for WinScard, -lwinscard could be used instead of the
|
||||||
#dynamic symbol loading that is now used in pcsc_funcs.c
|
#dynamic symbol loading that is now used in pcsc_funcs.c
|
||||||
#LIBS += -lwinscard
|
#LIBS += -lwinscard
|
||||||
|
CFLAGS += -I/usr/include/PCSC
|
||||||
else
|
else
|
||||||
ifdef CONFIG_OSX
|
ifdef CONFIG_OSX
|
||||||
LIBS += -framework PCSC
|
LIBS += -framework PCSC
|
||||||
|
CFLAGS += -I/usr/include/PCSC
|
||||||
else
|
else
|
||||||
LIBS += $(shell $(PKG_CONFIG) --libs libpcsclite)
|
LIBS += $(shell $(PKG_CONFIG) --libs libpcsclite)
|
||||||
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue