rbutil: store the voice language in the correct setting.
[kugel-rb.git] / apps / lang / lang.make
blobe32f084a293e76e3777703207a56d00718bbe3ae
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES)
11 LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng)
12 LANG_O = $(BUILDDIR)/lang/lang_core.o
14 CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang*
16 # $(BUILDDIR)/apps/lang must exist before we create dependencies on it,
17 # otherwise make will simply ignore those dependencies.
18 # Therefore we create it here.
19 #DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang)
21 $(BUILDDIR)/lang/max_language_size.h: $(LANGOBJ)
22 $(call PRINTS,Create $(notdir $@))
23 $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@
25 $(BUILDDIR)/lang/lang_core.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features
26 $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \
27 perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $<
28 $(call PRINTS,CC lang_core.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang/lang_core.c -o $@
30 $(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features
31 $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<))
32 $(SILENT)mkdir -p $(dir $@)
33 $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME)`cat $(BUILDDIR)/apps/genlang-features` -i=$(TARGET_ID) -b=$@ $<