xref: /freebsd-13-stable/sys/modules/uart/Makefile (revision 5510f79042fbd543de55807d0da7f8a2b8be2f89)
1
2.PATH: ${SRCTOP}/sys/dev/uart
3
4.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
5    ${MACHINE_CPUARCH} == "i386"
6uart_bus_acpi=uart_bus_acpi.c
7uart_cpu_acpi=uart_cpu_acpi.c
8.endif
9
10.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
11    ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "riscv"
12ofw_bus_if=	ofw_bus_if.h
13.endif
14
15.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
16_uart_cpu=uart_cpu_x86.c
17.else
18_uart_cpu=uart_cpu_${MACHINE}.c
19.endif
20.if exists(${.CURDIR:H:H}/dev/uart/${_uart_cpu})
21uart_cpu_machine= ${_uart_cpu}
22.endif
23
24.if ${MACHINE} == "arm64"
25uart_dev_mvebu=uart_dev_mvebu.c
26uart_dev_mu=uart_dev_mu.c
27.endif
28
29KMOD=	uart
30SRCS=	${uart_bus_acpi} uart_bus_isa.c \
31	uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \
32	uart_core.c ${uart_cpu_acpi} ${uart_cpu_machine} uart_dbg.c \
33	${uart_dev_mvebu} uart_dev_ns8250.c ${uart_dev_mu} \
34	uart_dev_quicc.c uart_dev_z8530.c \
35	uart_if.c uart_if.h uart_subr.c uart_tty.c
36
37SRCS+=	acpi_if.h bus_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \
38	serdev_if.h
39SRCS+=	opt_acpi.h opt_platform.h opt_uart.h
40
41.include <bsd.kmod.mk>
42