From a5a8dba9080f5b2643fbdcc5b9764d88bcea9852 Mon Sep 17 00:00:00 2001 From: dborth Date: Tue, 2 Sep 2008 01:39:56 +0000 Subject: [PATCH] makefile tweak --- Makefile.gc | 8 +++++--- Makefile.wii | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile.gc b/Makefile.gc index db50502..57be6de 100644 --- a/Makefile.gc +++ b/Makefile.gc @@ -17,7 +17,8 @@ include $(DEVKITPPC)/gamecube_rules # SOURCES is a list of directories containing source code # INCLUDES is a list of directories containing extra header files #--------------------------------------------------------------------------------- -TARGET := executables/snes9xgx-$(VERSION)-gc +TARGET := snes9xgx-$(VERSION)-gc +TARGETDIR := executables BUILD := build_gc SOURCES := source/snes9x source/ngc DATA := data @@ -56,7 +57,7 @@ LIBDIRS := $(CURDIR) ifneq ($(BUILD),$(notdir $(CURDIR))) #--------------------------------------------------------------------------------- -export OUTPUT := $(CURDIR)/$(TARGET) +export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET) export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ $(foreach dir,$(DATA),$(CURDIR)/$(dir)) @@ -99,12 +100,13 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \ -L$(LIBOGC_LIB) -export OUTPUT := $(CURDIR)/$(TARGET) +export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET) .PHONY: $(BUILD) clean #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ + @[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR) @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.gc @rm -fr $(OUTPUT).elf diff --git a/Makefile.wii b/Makefile.wii index 4017160..cb10133 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -17,7 +17,8 @@ include $(DEVKITPPC)/wii_rules # SOURCES is a list of directories containing source code # INCLUDES is a list of directories containing extra header files #--------------------------------------------------------------------------------- -TARGET := executables/snes9xgx-$(VERSION)-wii +TARGET := snes9xgx-$(VERSION)-wii +TARGETDIR := executables BUILD := build_wii SOURCES := source/snes9x source/ngc DATA := data @@ -56,7 +57,7 @@ LIBDIRS := $(CURDIR) ifneq ($(BUILD),$(notdir $(CURDIR))) #--------------------------------------------------------------------------------- -export OUTPUT := $(CURDIR)/$(TARGET) +export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET) export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ $(foreach dir,$(DATA),$(CURDIR)/$(dir)) @@ -99,12 +100,13 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \ -L$(LIBOGC_LIB) -export OUTPUT := $(CURDIR)/$(TARGET) +export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET) .PHONY: $(BUILD) clean #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ + @[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR) @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii @rm -fr $(OUTPUT).elf