Fix unsafe substitutions in Makefile.

Strange things can happen in the (unlikely) case that ROOTDIR=/rockbox

Change-Id: I085f928fd859b307667e8fccf40b29a9c325f7ae
This commit is contained in:
Amaury Pouly 2017-05-12 19:50:56 +10:00
parent 65c6a14e5f
commit b959655822
3 changed files with 17 additions and 2 deletions

View file

@ -157,7 +157,7 @@ endif # CORE_GCSECTIONS
OBJ := $(SRC:.c=.o)
OBJ := $(OBJ:.S=.o)
OBJ += $(BMP:.bmp=.o)
OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(OBJ))
OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(OBJ))
build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) $(ARCHOSROM) $(RBINFO)