drivers/char/Makefile cleanup for console and serial

Russell King (rmk@arm.linux.org.uk)
Wed, 15 Dec 1999 19:54:07 +0000 (GMT)


Sorry, forgot to CC: this to linux-kernel. ;(

Hi Linus & l-k,

Here is a patch for 2.3.33 which cleans up the keymap, keyboard, console
and serial handling in drivers/char/Makefile. It was becoming quite
horrific.

If there are no complaints from any of the architecture maintainers,
could it be applied for 2.3.34 please?

(yes, I realise that there is a makefile line for serial_21285.o buried
in this patch, and I do intend it to be there).

--- /mnt/src/kernel-source/orig/v2.3/linux/drivers/char/Makefile Wed Dec 15 19:40:31 1999
+++ linux/drivers/char/Makefile Wed Dec 15 19:42:44 1999
@@ -23,35 +23,54 @@
O_OBJS := tty_io.o n_tty.o tty_ioctl.o mem.o random.o raw.o
OX_OBJS := pty.o misc.o

+KEYMAP =defkeymap.o
+KEYBD =pc_keyb.o
+CONSOLE =console.o
+SERIAL =serial.o
+
+ifeq ($(ARCH),m68k)
+ KEYMAP =
+ KEYBD =
+endif
+
+ifeq ($(ARCH),arm)
+ KEYMAP =
+ KEYBD =
+ CONSOLE =
+ SERIAL =
+endif
+
+ifneq ($(CONFIG_SUN_SERIAL),)
+ SERIAL =
+endif
+
ifdef CONFIG_VT
O_OBJS += vt.o vc_screen.o consolemap.o consolemap_deftbl.o
-OX_OBJS += console.o selection.o
+OX_OBJS += $(CONSOLE) selection.o
endif

ifeq ($(CONFIG_SERIAL),y)
- ifeq ($(CONFIG_SUN_SERIAL),)
- OX_OBJS += serial.o
- endif
+OX_OBJS += $(SERIAL)
else
ifeq ($(CONFIG_SERIAL),m)
- ifeq ($(CONFIG_SUN_SERIAL),)
- MX_OBJS += serial.o
- endif
+ MX_OBJS += $(SERIAL)
endif
endif

-ifndef CONFIG_SUN_KEYBOARD
-ifdef CONFIG_VT
-OX_OBJS += keyboard.o
+ifeq ($(CONFIG_SERIAL_21285),y)
+O_OBJS += serial_21285.o
endif
- ifneq ($(ARCH),m68k)
- O_OBJS += pc_keyb.o defkeymap.o
- endif
+
+ifndef CONFIG_SUN_KEYBOARD
+ ifdef CONFIG_VT
+ OX_OBJS += keyboard.o
+ O_OBJS += $(KEYMAP) $(KEYBD)
+ endif
else
-ifdef CONFIG_PCI
-O_OBJS += defkeymap.o
-OX_OBJS += keyboard.o
-endif
+ ifdef CONFIG_PCI
+ OX_OBJS += keyboard.o
+ O_OBJS += $(KEYMAP)
+ endif
endif

ifdef CONFIG_MAGIC_SYSRQ

_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |

_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/