Only include UART related files when (at least) one UART driver is enabled
This commit is contained in:
parent
f3f2ec1c0f
commit
699e9123ea
3 changed files with 13 additions and 5 deletions
|
@ -118,6 +118,9 @@ fi
|
||||||
# Handle --with-drivers option
|
# Handle --with-drivers option
|
||||||
LIBNFC_ARG_WITH_DRIVERS
|
LIBNFC_ARG_WITH_DRIVERS
|
||||||
|
|
||||||
|
# Enable UART if
|
||||||
|
AM_CONDITIONAL(UART_ENABLED, [test x"$uart_required" = x"yes"])
|
||||||
|
|
||||||
# Documentation (default: no)
|
# Documentation (default: no)
|
||||||
AC_ARG_ENABLE([doc],AS_HELP_STRING([--enable-doc],[Enable documentation generation.]),[enable_doc=$enableval],[enable_doc="no"])
|
AC_ARG_ENABLE([doc],AS_HELP_STRING([--enable-doc],[Enable documentation generation.]),[enable_doc=$enableval],[enable_doc="no"])
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,14 @@ noinst_LTLIBRARIES = libnfcbuses.la
|
||||||
libnfcbuses_la_SOURCES =
|
libnfcbuses_la_SOURCES =
|
||||||
libnfcbuses_la_CFLAGS = -I$(top_srcdir)/libnfc
|
libnfcbuses_la_CFLAGS = -I$(top_srcdir)/libnfc
|
||||||
libnfcbuses_la_LIBADD =
|
libnfcbuses_la_LIBADD =
|
||||||
|
EXTRA_DIST =
|
||||||
|
|
||||||
# UART_ENABLED
|
if UART_ENABLED
|
||||||
libnfcbuses_la_SOURCES += uart.c uart.h
|
libnfcbuses_la_SOURCES += uart.c uart.h
|
||||||
libnfcbuses_la_CFLAGS +=
|
libnfcbuses_la_CFLAGS +=
|
||||||
libnfcbuses_la_LIBADD +=
|
libnfcbuses_la_LIBADD +=
|
||||||
EXTRA_DIST = uart_posix.c uart_win32.c
|
endif
|
||||||
|
EXTRA_DIST += uart.c uart.h uart_posix.c uart_win32.c
|
||||||
|
|
||||||
if LIBUSB_ENABLED
|
if LIBUSB_ENABLED
|
||||||
libnfcbuses_la_SOURCES += usbbus.c usbbus.h
|
libnfcbuses_la_SOURCES += usbbus.c usbbus.h
|
||||||
|
|
|
@ -55,6 +55,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122_USB_ENABLED"
|
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122_USB_ENABLED"
|
||||||
;;
|
;;
|
||||||
acr122s)
|
acr122s)
|
||||||
|
uart_required="yes"
|
||||||
driver_acr122s_enabled="yes"
|
driver_acr122s_enabled="yes"
|
||||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122S_ENABLED"
|
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122S_ENABLED"
|
||||||
;;
|
;;
|
||||||
|
@ -64,10 +65,12 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN53X_USB_ENABLED"
|
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN53X_USB_ENABLED"
|
||||||
;;
|
;;
|
||||||
arygon)
|
arygon)
|
||||||
|
uart_required="yes"
|
||||||
driver_arygon_enabled="yes"
|
driver_arygon_enabled="yes"
|
||||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ARYGON_ENABLED"
|
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ARYGON_ENABLED"
|
||||||
;;
|
;;
|
||||||
pn532_uart)
|
pn532_uart)
|
||||||
|
uart_required="yes"
|
||||||
driver_pn532_uart_enabled="yes"
|
driver_pn532_uart_enabled="yes"
|
||||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN532_UART_ENABLED"
|
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN532_UART_ENABLED"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue