1# SPDX-License-Identifier: GPL-2.0
2obj-$(CONFIG_SPEAKUP_SYNTH_ACNTSA) += speakup_acntsa.o
3obj-$(CONFIG_SPEAKUP_SYNTH_ACNTPC) += speakup_acntpc.o
4obj-$(CONFIG_SPEAKUP_SYNTH_APOLLO) += speakup_apollo.o
5obj-$(CONFIG_SPEAKUP_SYNTH_AUDPTR) += speakup_audptr.o
6obj-$(CONFIG_SPEAKUP_SYNTH_BNS) += speakup_bns.o
7obj-$(CONFIG_SPEAKUP_SYNTH_DECTLK) += speakup_dectlk.o
8obj-$(CONFIG_SPEAKUP_SYNTH_DECEXT) += speakup_decext.o
9obj-$(CONFIG_SPEAKUP_SYNTH_DECPC) += speakup_decpc.o
10obj-$(CONFIG_SPEAKUP_SYNTH_DTLK) += speakup_dtlk.o
11obj-$(CONFIG_SPEAKUP_SYNTH_KEYPC) += speakup_keypc.o
12obj-$(CONFIG_SPEAKUP_SYNTH_LTLK) += speakup_ltlk.o
13obj-$(CONFIG_SPEAKUP_SYNTH_SOFT) += speakup_soft.o
14obj-$(CONFIG_SPEAKUP_SYNTH_SPKOUT) += speakup_spkout.o
15obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += speakup_txprt.o
16obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o
17
18obj-$(CONFIG_SPEAKUP) += speakup.o
19speakup-y := \
20	buffers.o \
21	devsynth.o \
22	i18n.o \
23	fakekey.o \
24	main.o \
25	keyhelp.o \
26	kobjects.o \
27	selection.o \
28	spk_ttyio.o \
29	synth.o \
30	thread.o \
31	varhandlers.o
32speakup-$(CONFIG_SPEAKUP_SERIALIO) += serialio.o
33
34
35clean-files := mapdata.h speakupmap.h
36
37
38# Generate mapdata.h from headers
39hostprogs += makemapdata
40makemapdata-objs := makemapdata.o
41
42quiet_cmd_mkmap = MKMAP   $@
43      cmd_mkmap = TOPDIR=$(srctree) $(obj)/makemapdata > $@
44
45$(obj)/mapdata.h: $(obj)/makemapdata
46	$(call cmd,mkmap)
47
48
49# Generate speakupmap.h from mapdata.h
50hostprogs += genmap
51genmap-objs := genmap.o
52$(obj)/genmap.o: $(obj)/mapdata.h
53
54quiet_cmd_genmap = GENMAP  $@
55      cmd_genmap = $(obj)/genmap $< > $@
56
57$(obj)/speakupmap.h: $(src)/speakupmap.map $(obj)/genmap
58	$(call cmd,genmap)
59
60$(obj)/main.o: $(obj)/speakupmap.h
61