Only include SPI related files when (at least) one SPI driver is enabled
This commit is contained in:
parent
1ab282d43c
commit
fc420d58af
3 changed files with 8 additions and 3 deletions
|
@ -121,6 +121,9 @@ LIBNFC_ARG_WITH_DRIVERS
|
|||
# Enable UART if
|
||||
AM_CONDITIONAL(UART_ENABLED, [test x"$uart_required" = x"yes"])
|
||||
|
||||
# Enable SPI if
|
||||
AM_CONDITIONAL(SPI_ENABLED, [test x"$spi_required" = x"yes"])
|
||||
|
||||
# Documentation (default: no)
|
||||
AC_ARG_ENABLE([doc],AS_HELP_STRING([--enable-doc],[Enable documentation generation.]),[enable_doc=$enableval],[enable_doc="no"])
|
||||
|
||||
|
|
|
@ -8,11 +8,12 @@ libnfcbuses_la_CFLAGS = -I$(top_srcdir)/libnfc
|
|||
libnfcbuses_la_LIBADD =
|
||||
EXTRA_DIST =
|
||||
|
||||
# SPI_ENABLED
|
||||
if SPI_ENABLED
|
||||
libnfcbuses_la_SOURCES += spi.c spi.h
|
||||
libnfcbuses_la_CFLAGS +=
|
||||
libnfcbuses_la_LIBADD +=
|
||||
EXTRA_DIST = spi_posix.c
|
||||
endif
|
||||
EXTRA_DIST = spi.c spi.h
|
||||
|
||||
if UART_ENABLED
|
||||
libnfcbuses_la_SOURCES += uart.c uart.h
|
||||
|
|
|
@ -76,6 +76,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN532_UART_ENABLED"
|
||||
;;
|
||||
pn532_spi)
|
||||
spi_required="yes"
|
||||
driver_pn532_spi_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN532_SPI_ENABLED"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue