mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
DSPSpy: sync Makefile with current devkitPro template
This commit is contained in:
parent
fb041f75e5
commit
a56e6be999
@ -24,7 +24,6 @@ include $(DEVKITPPC)/$(HW_TYPE)_rules
|
|||||||
TARGET := $(notdir $(CURDIR))_$(HW_TYPE)
|
TARGET := $(notdir $(CURDIR))_$(HW_TYPE)
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := . emu
|
SOURCES := . emu
|
||||||
RESOURCES := ../resources
|
|
||||||
DATA := data
|
DATA := data
|
||||||
INCLUDES := include ../Core/Common .
|
INCLUDES := include ../Core/Common .
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ INCLUDES := include ../Core/Common .
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
CFLAGS = -save-temps -O2 -Wall --no-strict-aliasing $(MACHDEP) $(INCLUDE)
|
CFLAGS = -save-temps -O2 -Wall --no-strict-aliasing $(MACHDEP) $(INCLUDE)
|
||||||
CXXFLAGS = -std=c++0x $(CFLAGS)
|
CXXFLAGS = -std=c++17 -Wno-register $(CFLAGS)
|
||||||
|
|
||||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||||
|
|
||||||
@ -41,9 +40,9 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
|||||||
# any extra libraries we wish to link with the project
|
# any extra libraries we wish to link with the project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ifeq ($(HW_TYPE), gamecube)
|
ifeq ($(HW_TYPE), gamecube)
|
||||||
LIBS := -lfat -lasnd -lmodplay -ldb -logc -lm
|
LIBS := -lfat -ldb -logc -lm
|
||||||
else
|
else
|
||||||
LIBS := -lfat -lasnd -lmodplay -lwiiuse -lbte -logc -lm
|
LIBS := -lfat -lwiiuse -lbte -logc -lm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@ -61,7 +60,7 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
|
|||||||
|
|
||||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||||
|
|
||||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) $(foreach dir,$(RESOURCES),$(CURDIR)/$(dir))\
|
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||||
|
|
||||||
export DEPSDIR := $(CURDIR)/$(BUILD)
|
export DEPSDIR := $(CURDIR)/$(BUILD)
|
||||||
@ -70,7 +69,6 @@ export DEPSDIR := $(CURDIR)/$(BUILD)
|
|||||||
# automatically build a list of object files for our project
|
# automatically build a list of object files for our project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||||
CFILES += $(foreach dir,$(RESOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
|
||||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||||
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
||||||
@ -86,14 +84,16 @@ else
|
|||||||
export LD := $(CXX)
|
export LD := $(CXX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export OFILES := $(addsuffix .o,$(BINFILES)) \
|
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
|
||||||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
|
export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
|
||||||
$(sFILES:.s=.o) $(SFILES:.S=.o)
|
export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
|
||||||
|
|
||||||
|
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build a list of include paths
|
# build a list of include paths
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||||
-I$(CURDIR)/$(BUILD) \
|
-I$(CURDIR)/$(BUILD) \
|
||||||
-I$(LIBOGC_INC)
|
-I$(LIBOGC_INC)
|
||||||
@ -101,8 +101,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build a list of library paths
|
# build a list of library paths
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
export LIBPATHS := -L$(LIBOGC_LIB) $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
||||||
-L$(LIBOGC_LIB)
|
|
||||||
|
|
||||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||||
.PHONY: $(BUILD) clean
|
.PHONY: $(BUILD) clean
|
||||||
@ -116,6 +115,7 @@ $(BUILD):
|
|||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
run:
|
run:
|
||||||
ifeq ($(HW_TYPE), gamecube)
|
ifeq ($(HW_TYPE), gamecube)
|
||||||
@ -139,8 +139,9 @@ DEPENDS := $(OFILES:.o=.d)
|
|||||||
# main targets
|
# main targets
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
$(OUTPUT).dol: $(OUTPUT).elf
|
$(OUTPUT).dol: $(OUTPUT).elf
|
||||||
$(OUTPUT).elf: $(OFILES)
|
$(OUTPUT).elf: $(OFILES)
|
||||||
|
|
||||||
|
$(OFILES_SOURCES) : $(HFILES)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# This rule links in binary data with the .bin extension
|
# This rule links in binary data with the .bin extension
|
||||||
|
Loading…
x
Reference in New Issue
Block a user