Add LANG variable to Makefile to select language file
This commit is contained in:
parent
f6ed5f50a2
commit
f26b504bd1
2 changed files with 11 additions and 2 deletions
10
Makefile
10
Makefile
|
@ -195,6 +195,16 @@ $(error Invalid target: T=$(T))
|
||||||
endif
|
endif
|
||||||
export T
|
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=<languageAbbrev>)
|
||||||
|
endif
|
||||||
|
ifeq ($(wildcard $(LANGUAGE_SOUND_FOLDER)),)
|
||||||
|
$(error Invalid target: LANG=$(LANG))
|
||||||
|
endif
|
||||||
|
export LANG
|
||||||
|
|
||||||
KBUILD_OUTPUT := $(KBUILD_OUTPUT)/$(T)
|
KBUILD_OUTPUT := $(KBUILD_OUTPUT)/$(T)
|
||||||
|
|
||||||
# That's our default target when none is given on the command line
|
# That's our default target when none is given on the command line
|
||||||
|
|
|
@ -9,8 +9,7 @@ ifeq ($(VOICE_DATAPATH_TYPE),gsound)
|
||||||
obj_cpp += $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)/app_voice/app_$(VOICE_DATAPATH_TYPE)/*.cpp))
|
obj_cpp += $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)/app_voice/app_$(VOICE_DATAPATH_TYPE)/*.cpp))
|
||||||
endif
|
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/$(LANG)/*.mp3))
|
||||||
obj_mp3 += $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/cn/*.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)
|
obj-y := $(obj_mp3:.mp3=.snd.o) $(obj_mp3:.mp3=.snd.cpp) $(obj_c:.c=.o) $(obj_s:.S=.o) $(obj_cpp:.cpp=.o)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue