Makefile 1.7 KB

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