diff --git a/Makefile b/Makefile index 1e82a74..942fb4a 100644 --- a/Makefile +++ b/Makefile @@ -195,6 +195,16 @@ $(error Invalid target: T=$(T)) endif export T +# Select sound language +LANGUAGE_SOUND_FOLDER = config/_default_cfg_src_/res/$(LANG) +ifeq ($(LANG),) +$(error Please specify the sound language in the command line: LANG=) +endif +ifeq ($(wildcard $(LANGUAGE_SOUND_FOLDER)),) +$(error Invalid target: LANG=$(LANG)) +endif +export LANG + KBUILD_OUTPUT := $(KBUILD_OUTPUT)/$(T) # That's our default target when none is given on the command line diff --git a/services/bt_app/Makefile b/services/bt_app/Makefile index 684c540..e74116e 100644 --- a/services/bt_app/Makefile +++ b/services/bt_app/Makefile @@ -9,8 +9,7 @@ ifeq ($(VOICE_DATAPATH_TYPE),gsound) obj_cpp += $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)/app_voice/app_$(VOICE_DATAPATH_TYPE)/*.cpp)) endif -obj_mp3 := $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/en/*.mp3)) -obj_mp3 += $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/cn/*.mp3)) +obj_mp3 := $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/$(LANG)/*.mp3)) obj-y := $(obj_mp3:.mp3=.snd.o) $(obj_mp3:.mp3=.snd.cpp) $(obj_c:.c=.o) $(obj_s:.S=.o) $(obj_cpp:.cpp=.o)