Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0
2#
3# This file contains the font map for the default (hardware) font
4#
5FONTMAPFILE = cp437.uni
6
7obj-$(CONFIG_VT) += vt_ioctl.o vc_screen.o \
8 selection.o keyboard.o \
9 vt.o defkeymap.o
10obj-$(CONFIG_CONSOLE_TRANSLATIONS) += consolemap.o consolemap_deftbl.o \
11 ucs.o
12
13# Files generated that shall be removed upon make clean
14clean-files := consolemap_deftbl.c defkeymap.c \
15 ucs_width_table.h ucs_recompose_table.h ucs_fallback_table.h
16
17hostprogs += conmakehash
18
19quiet_cmd_conmk = CONMK $@
20 cmd_conmk = $(obj)/conmakehash $< > $@
21
22$(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash
23 $(call cmd,conmk)
24
25$(obj)/defkeymap.o: $(obj)/defkeymap.c
26
27# Uncomment if you're changing the keymap and have an appropriate
28# loadkeys version for the map. By default, we'll use the shipped
29# versions.
30# GENERATE_KEYMAP := 1
31
32ifdef GENERATE_KEYMAP
33
34$(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map
35 loadkeys --mktable --unicode $< > $@
36
37endif
38
39$(obj)/ucs.o: $(src)/ucs.c $(obj)/ucs_width_table.h \
40 $(obj)/ucs_recompose_table.h $(obj)/ucs_fallback_table.h
41
42# You may uncomment one of those to have the UCS tables be regenerated
43# during the build process. By default the _shipped versions are used.
44#
45#GENERATE_UCS_TABLES := 1
46#GENERATE_UCS_TABLES := 2 # invokes gen_ucs_recompose_table.py with --full
47
48ifdef GENERATE_UCS_TABLES
49
50$(obj)/ucs_width_table.h: $(src)/gen_ucs_width_table.py
51 $(PYTHON3) $< -o $@
52
53ifeq ($(GENERATE_UCS_TABLES),2)
54gen_recomp_arg := --full
55else
56gen_recomp_arg :=
57endif
58
59$(obj)/ucs_recompose_table.h: $(src)/gen_ucs_recompose_table.py
60 $(PYTHON3) $< -o $@ $(gen_recomp_arg)
61
62$(obj)/ucs_fallback_table.h: $(src)/gen_ucs_fallback_table.py
63 $(PYTHON3) $< -o $@
64
65endif