From 90cd88f1a8b56ca6e71f973606e1d3c77e11c4a1 Mon Sep 17 00:00:00 2001 From: Thatcher Chamberlin Date: Sun, 19 Feb 2023 14:36:52 -0500 Subject: [PATCH] LANG -> AUDIO --- Makefile | 14 +++++++------- README.md | 6 +++--- build.sh | 4 ++-- services/bt_app/Makefile | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 942fb4a..73f9f95 100644 --- a/Makefile +++ b/Makefile @@ -195,15 +195,15 @@ $(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=) +# Select audio source +AUDIO_FOLDER = config/_default_cfg_src_/res/$(AUDIO) +ifeq ($(AUDIO),) +$(error Please specify the sound language in the command line: AUDIO=) endif -ifeq ($(wildcard $(LANGUAGE_SOUND_FOLDER)),) -$(error Invalid target: LANG=$(LANG)) +ifeq ($(wildcard $(AUDIO_FOLDER)),) +$(error Invalid target: AUDIO=$(AUDIO)) endif -export LANG +export AUDIO KBUILD_OUTPUT := $(KBUILD_OUTPUT)/$(T) diff --git a/README.md b/README.md index d343337..c4bfb83 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,10 @@ and recompile with `./build.sh`! ### Language support -The `LANG` environment variable can be set when running the `build.sh` script to load sound files -for languages other than the default English. For example, running `LANG=cn ./build.sh` will load sounds files from +The `AUDIO` environment variable can be set when running the `build.sh` script to load sound files +for languages other than the default English. For example, running `AUDIO=cn ./build.sh` will load sounds files from `config/_default_cfg_src_/res/cn/` instead of the default `en/` folder. The current languages supported with sound files are English (`en`) and Chinese (`cn`). Other languages (or other sets of custom sounds) may be added by adding all the correct sound files into a -`config/_default_cfg_src_/res//` directory and building with `LANG= ./build.sh`. \ No newline at end of file +`config/_default_cfg_src_/res//` directory and building with `AUDIO= ./build.sh`. \ No newline at end of file diff --git a/build.sh b/build.sh index 7f35757..9b46afa 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash -# use LANG environment variable, default to "en" -LANG="${LANG:-en}" +# use AUDIO environment variable, default to "en" +AUDIO="${AUDIO:-en}" make -j T=open_source DEBUG=1 >log.txt 2>&1 diff --git a/services/bt_app/Makefile b/services/bt_app/Makefile index e74116e..c5624b9 100644 --- a/services/bt_app/Makefile +++ b/services/bt_app/Makefile @@ -9,7 +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/$(LANG)/*.mp3)) +obj_mp3 := $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/$(AUDIO)/*.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)