makefile tweak

This commit is contained in:
dborth 2008-09-02 01:39:56 +00:00
parent 7c127abfe1
commit a5a8dba908
2 changed files with 10 additions and 6 deletions

View File

@ -17,7 +17,8 @@ include $(DEVKITPPC)/gamecube_rules
# SOURCES is a list of directories containing source code # SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files # INCLUDES is a list of directories containing extra header files
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TARGET := executables/snes9xgx-$(VERSION)-gc TARGET := snes9xgx-$(VERSION)-gc
TARGETDIR := executables
BUILD := build_gc BUILD := build_gc
SOURCES := source/snes9x source/ngc SOURCES := source/snes9x source/ngc
DATA := data DATA := data
@ -56,7 +57,7 @@ LIBDIRS := $(CURDIR)
ifneq ($(BUILD),$(notdir $(CURDIR))) ifneq ($(BUILD),$(notdir $(CURDIR)))
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET) export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(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) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB) -L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET) export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
.PHONY: $(BUILD) clean .PHONY: $(BUILD) clean
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(BUILD): $(BUILD):
@[ -d $@ ] || mkdir -p $@ @[ -d $@ ] || mkdir -p $@
@[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.gc @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.gc
@rm -fr $(OUTPUT).elf @rm -fr $(OUTPUT).elf

View File

@ -17,7 +17,8 @@ include $(DEVKITPPC)/wii_rules
# SOURCES is a list of directories containing source code # SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files # INCLUDES is a list of directories containing extra header files
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TARGET := executables/snes9xgx-$(VERSION)-wii TARGET := snes9xgx-$(VERSION)-wii
TARGETDIR := executables
BUILD := build_wii BUILD := build_wii
SOURCES := source/snes9x source/ngc SOURCES := source/snes9x source/ngc
DATA := data DATA := data
@ -56,7 +57,7 @@ LIBDIRS := $(CURDIR)
ifneq ($(BUILD),$(notdir $(CURDIR))) ifneq ($(BUILD),$(notdir $(CURDIR)))
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET) export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(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) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB) -L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET) export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
.PHONY: $(BUILD) clean .PHONY: $(BUILD) clean
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(BUILD): $(BUILD):
@[ -d $@ ] || mkdir -p $@ @[ -d $@ ] || mkdir -p $@
@[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii
@rm -fr $(OUTPUT).elf @rm -fr $(OUTPUT).elf