From a8f0a0405e371cd3dac565cb60bb3f69ac7c9da3 Mon Sep 17 00:00:00 2001 From: gered Date: Mon, 24 Oct 2016 18:05:13 -0400 Subject: [PATCH] ensure that build succeeds, even if $(DEVKITPPC)/bin is not on PATH there is no need for it to be on the PATH, and with this simple change it's never going to be a problem for building sdl-wii --- SDL/Makefile | 6 +++--- SDL_gfx/Makefile | 4 ++-- SDL_image/Makefile | 10 +++++----- SDL_mixer/Makefile | 10 +++++----- SDL_net/Makefile | 4 ++-- SDL_ttf/Makefile | 10 +++++----- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/SDL/Makefile b/SDL/Makefile index 4edb4ba..bf98644 100644 --- a/SDL/Makefile +++ b/SDL/Makefile @@ -76,14 +76,14 @@ test-clean: $(LIB_DIR)/libSDL.a: $(SDL_OBJS) @echo Archiving $@ @-mkdir -p $(dir $@) - powerpc-eabi-ar crs $@ $(SDL_OBJS) + @$(DEVKITPPC)/bin/powerpc-eabi-ar crs $@ $(SDL_OBJS) @echo ---- # How to build a DOL. $(BIN_DIR)/%.dol: $(TEST_OBJ_DIR)/%.elf @echo Creating DOL $@ @-mkdir -p $(dir $@) - elf2dol $< $@ + @$(DEVKITPPC)/bin/elf2dol $< $@ @echo ---- # Compilation flags. @@ -99,4 +99,4 @@ LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(LIBOGC_LIB) -lSDL -lwiikeyboard -l $(SDL_OBJ_DIR)/%.o: $(SDL_SRC_DIR)/%.c @echo Compiling $< @-mkdir -p $(dir $@) - powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) diff --git a/SDL_gfx/Makefile b/SDL_gfx/Makefile index 3ee58a5..dfd6e4e 100644 --- a/SDL_gfx/Makefile +++ b/SDL_gfx/Makefile @@ -41,7 +41,7 @@ clean: $(LIB_DIR)/libSDL_gfx.a: $(OBJS) @echo Archiving $@ @-mkdir -p $(dir $@) - @powerpc-eabi-ar crs $@ $(OBJS) + @$(DEVKITPPC)/bin/powerpc-eabi-ar crs $@ $(OBJS) @echo ---- install: all @@ -66,4 +66,4 @@ CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES) $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c @echo Compiling $< @-mkdir -p $(dir $@) - @powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) diff --git a/SDL_image/Makefile b/SDL_image/Makefile index a269207..4beb23d 100644 --- a/SDL_image/Makefile +++ b/SDL_image/Makefile @@ -61,7 +61,7 @@ test-install: $(TEST_DOLS) $(LIB_DIR)/libSDL_image.a: $(OBJS) @echo Archiving $@ @-mkdir -p $(dir $@) - @powerpc-eabi-ar crs $@ $(OBJS) + @$(DEVKITPPC)/bin/powerpc-eabi-ar crs $@ $(OBJS) @echo ---- # How to build a DOL. @@ -69,7 +69,7 @@ $(BIN_DIR)/%.dol: $(TEST_OBJ_DIR)/%.elf @echo Creating DOL $@ @-mkdir -p $(dir $@) #powerpc-eabi-objcopy -O binary $< $@ - elf2dol $< $@ + @$(DEVKITPPC)/bin/elf2dol $< $@ @echo ---- # How to copy the header file @@ -95,7 +95,7 @@ LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(LIBOGC_LIB) -lSDL_image -lSDL -lpn $(TEST_OBJ_DIR)/%.elf: $(TEST_OBJ_DIR)/%.o $(LIB_DIR)/libSDL_image.a $(DEVKITPRO)/libSDL/lib/libSDL.a @echo Linking $@ @-mkdir -p $(dir $@) - powerpc-eabi-g++ -o $@ $< $(LDFLAGS) + @$(DEVKITPPC)/bin/powerpc-eabi-g++ -o $@ $< $(LDFLAGS) #keep elf for debugging #cp $@ /tmp/elf @@ -103,10 +103,10 @@ $(TEST_OBJ_DIR)/%.elf: $(TEST_OBJ_DIR)/%.o $(LIB_DIR)/libSDL_image.a $(DEVKITPRO $(TEST_OBJ_DIR)/%.o: $(TEST_SRC_DIR)/showimage.c @echo Compiling $< @-mkdir -p $(dir $@) - powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) # How to compile C file (SDL library). $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c @echo Compiling $< @-mkdir -p $(dir $@) - @powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) diff --git a/SDL_mixer/Makefile b/SDL_mixer/Makefile index 81b7eaa..0485a18 100644 --- a/SDL_mixer/Makefile +++ b/SDL_mixer/Makefile @@ -63,14 +63,14 @@ install: all $(LIB_DIR)/libSDL_mixer.a: $(OBJS) @echo Archiving $@ @-mkdir -p $(dir $@) - @powerpc-eabi-ar crs $@ $(OBJS) + @$(DEVKITPPC)/bin/powerpc-eabi-ar crs $@ $(OBJS) @echo ---- # How to build a DOL. $(BIN_DIR)/%.dol: $(TEST_OBJ_DIR)/%.elf @echo Creating DOL $@ @-mkdir -p $(dir $@) - elf2dol $< $@ + @$(DEVKITPPC)/bin/elf2dol $< $@ @echo ---- # How to copy a header file @@ -99,7 +99,7 @@ LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(LIBOGC_LIB) -L$(DEVKITPRO)/libsmpe $(TEST_OBJ_DIR)/%.elf: $(TEST_OBJ_DIR)/%.o $(LIB_DIR)/libSDL_mixer.a $(DEVKITPRO)/libSDL/lib/libSDL.a @echo Linking $@ @-mkdir -p $(dir $@) - powerpc-eabi-g++ -o $@ $< $(LDFLAGS) + @$(DEVKITPPC)/bin/powerpc-eabi-g++ -o $@ $< $(LDFLAGS) #keep elf for debugging #cp $@ /tmp/elf @@ -107,10 +107,10 @@ $(TEST_OBJ_DIR)/%.elf: $(TEST_OBJ_DIR)/%.o $(LIB_DIR)/libSDL_mixer.a $(DEVKITPRO $(TEST_OBJ_DIR)/%.o: $(TEST_SRC_DIR)/playmus.c $(TEST_SRC_DIR)/playwave.c @echo Compiling $< @-mkdir -p $(dir $@) - powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) # How to compile C file (SDL library). $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c @echo Compiling $< @-mkdir -p $(dir $@) - @powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) diff --git a/SDL_net/Makefile b/SDL_net/Makefile index 24ad72e..47a09ea 100644 --- a/SDL_net/Makefile +++ b/SDL_net/Makefile @@ -45,7 +45,7 @@ install: all $(LIB_DIR)/libSDL_net.a: $(OBJS) @echo Archiving $@ @-mkdir -p $(dir $@) - @powerpc-eabi-ar crs $@ $(OBJS) + @$(DEVKITPPC)/bin/powerpc-eabi-ar crs $@ $(OBJS) @echo ---- # How to copy a header file @@ -71,4 +71,4 @@ LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(LIBOGC_LIB) -lSDL -lfat -lwiiuse - $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c @echo Compiling $< @-mkdir -p $(dir $@) - @powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) diff --git a/SDL_ttf/Makefile b/SDL_ttf/Makefile index 40248b8..cb43b25 100644 --- a/SDL_ttf/Makefile +++ b/SDL_ttf/Makefile @@ -62,14 +62,14 @@ install: all $(LIB_DIR)/libSDL_ttf.a: $(OBJS) @echo Archiving $@ @-mkdir -p $(dir $@) - @powerpc-eabi-ar crs $@ $(OBJS) + @$(DEVKITPPC)/bin/powerpc-eabi-ar crs $@ $(OBJS) @echo ---- # How to build a DOL. $(BIN_DIR)/%.dol: $(TEST_OBJ_DIR)/%.elf @echo Creating DOL $@ @-mkdir -p $(dir $@) - elf2dol $< $@ + @$(DEVKITPPC)/bin/elf2dol $< $@ @echo ---- # How to copy a header file. @@ -91,7 +91,7 @@ LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(LIBOGC_LIB) -lSDL_ttf -lSDL -lfree $(TEST_OBJ_DIR)/%.elf: $(TEST_OBJ_DIR)/%.o $(LIB_DIR)/libSDL_ttf.a $(DEVKITPRO)/libSDL/lib/libSDL.a @echo Linking $@ @-mkdir -p $(dir $@) - powerpc-eabi-g++ -o $@ $< $(LDFLAGS) + @$(DEVKITPPC)/bin/powerpc-eabi-g++ -o $@ $< $(LDFLAGS) #keep elf for debugging #cp $@ /tmp/elf @@ -99,10 +99,10 @@ $(TEST_OBJ_DIR)/%.elf: $(TEST_OBJ_DIR)/%.o $(LIB_DIR)/libSDL_ttf.a $(DEVKITPRO)/ $(TEST_OBJ_DIR)/%.o: $(TEST_SRC_DIR)/showfont.c @echo Compiling $< @-mkdir -p $(dir $@) - powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) # How to compile C file (SDL library). $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c @echo Compiling $< @-mkdir -p $(dir $@) - @powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED) + @$(DEVKITPPC)/bin/powerpc-eabi-gcc $(CFLAGS) -c $< -o $@ $(PIPE_TO_SED)