xref: /linux/drivers/accessibility/speakup/Makefile (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
12067fd92SSamuel Thibault# SPDX-License-Identifier: GPL-2.0
22067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_ACNTSA) += speakup_acntsa.o
32067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_ACNTPC) += speakup_acntpc.o
42067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_APOLLO) += speakup_apollo.o
52067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_AUDPTR) += speakup_audptr.o
62067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_BNS) += speakup_bns.o
72067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_DECTLK) += speakup_dectlk.o
82067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_DECEXT) += speakup_decext.o
92067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_DECPC) += speakup_decpc.o
102067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_DTLK) += speakup_dtlk.o
112067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_KEYPC) += speakup_keypc.o
122067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_LTLK) += speakup_ltlk.o
132067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_SOFT) += speakup_soft.o
142067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_SPKOUT) += speakup_spkout.o
152067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += speakup_txprt.o
162067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o
172067fd92SSamuel Thibault
182067fd92SSamuel Thibaultobj-$(CONFIG_SPEAKUP) += speakup.o
192067fd92SSamuel Thibaultspeakup-y := \
202067fd92SSamuel Thibault	buffers.o \
212067fd92SSamuel Thibault	devsynth.o \
222067fd92SSamuel Thibault	i18n.o \
232067fd92SSamuel Thibault	fakekey.o \
242067fd92SSamuel Thibault	main.o \
252067fd92SSamuel Thibault	keyhelp.o \
262067fd92SSamuel Thibault	kobjects.o \
272067fd92SSamuel Thibault	selection.o \
282067fd92SSamuel Thibault	spk_ttyio.o \
292067fd92SSamuel Thibault	synth.o \
302067fd92SSamuel Thibault	thread.o \
312067fd92SSamuel Thibault	varhandlers.o
32dfe650beSSamuel Thibaultspeakup-$(CONFIG_SPEAKUP_SERIALIO) += serialio.o
336a5c94d9SSamuel Thibault
346a5c94d9SSamuel Thibault
356a5c94d9SSamuel Thibaultclean-files := mapdata.h speakupmap.h
366a5c94d9SSamuel Thibault
376a5c94d9SSamuel Thibault
386a5c94d9SSamuel Thibault# Generate mapdata.h from headers
396a5c94d9SSamuel Thibaulthostprogs += makemapdata
406a5c94d9SSamuel Thibaultmakemapdata-objs := makemapdata.o
416a5c94d9SSamuel Thibault
426a5c94d9SSamuel Thibaultquiet_cmd_mkmap = MKMAP   $@
43*e68a558fSSamuel Thibault      cmd_mkmap = TOPDIR=$(srctree) \
44*e68a558fSSamuel Thibault		  SPKDIR=$(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD),$(srctree)/drivers/accessibility/speakup) \
45*e68a558fSSamuel Thibault		  $(obj)/makemapdata > $@
466a5c94d9SSamuel Thibault
476a5c94d9SSamuel Thibault$(obj)/mapdata.h: $(obj)/makemapdata
486a5c94d9SSamuel Thibault	$(call cmd,mkmap)
496a5c94d9SSamuel Thibault
506a5c94d9SSamuel Thibault
516a5c94d9SSamuel Thibault# Generate speakupmap.h from mapdata.h
526a5c94d9SSamuel Thibaulthostprogs += genmap
536a5c94d9SSamuel Thibaultgenmap-objs := genmap.o
546a5c94d9SSamuel Thibault$(obj)/genmap.o: $(obj)/mapdata.h
556a5c94d9SSamuel Thibault
566a5c94d9SSamuel Thibaultquiet_cmd_genmap = GENMAP  $@
576a5c94d9SSamuel Thibault      cmd_genmap = $(obj)/genmap $< > $@
586a5c94d9SSamuel Thibault
596a5c94d9SSamuel Thibault$(obj)/speakupmap.h: $(src)/speakupmap.map $(obj)/genmap
606a5c94d9SSamuel Thibault	$(call cmd,genmap)
616a5c94d9SSamuel Thibault
626a5c94d9SSamuel Thibault$(obj)/main.o: $(obj)/speakupmap.h
63