1# $FreeBSD: stable/11/sys/modules/uart/Makefile 340145 2018-11-04 23:28:56Z mmacy $
2
3.PATH: ${SRCTOP}/sys/dev/uart
4
5
6.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
7    ${MACHINE_ARCH} == "i386"
8uart_bus_acpi=uart_bus_acpi.c
9.endif
10
11.if ${MACHINE_CPUARCH} == "sparc64"
12uart_bus_ebus=	uart_bus_ebus.c
13.endif
14
15.if ${MACHINE_CPUARCH} == "arm"
16uart_dev_lpc=	uart_dev_lpc.c
17.endif
18
19.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
20    ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc"
21ofw_bus_if=	ofw_bus_if.h
22.endif
23
24.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
25_uart_cpu=uart_cpu_x86.c
26.else
27_uart_cpu=uart_cpu_${MACHINE}.c
28.endif
29.if exists(${.CURDIR:H:H}/dev/uart/${_uart_cpu})
30uart_cpu_machine= ${_uart_cpu}
31.endif
32
33KMOD=	uart
34SRCS=	${uart_bus_acpi} ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \
35	uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \
36	uart_core.c ${uart_cpu_machine} uart_dbg.c \
37	${uart_dev_lpc} uart_dev_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \
38	uart_dev_z8530.c \
39	uart_if.c uart_if.h uart_subr.c uart_tty.c
40
41SRCS+=	acpi_if.h bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \
42	power_if.h pccarddevs.h serdev_if.h
43SRCS+=	opt_acpi.h opt_platform.h opt_uart.h
44
45.include <bsd.kmod.mk>
46