mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-27 13:16:14 +00:00
84 lines
2.1 KiB
Makefile
84 lines
2.1 KiB
Makefile
|
|
##
|
|
# Makefile for RetroArch GameCube.
|
|
##
|
|
|
|
DEBUG = 0
|
|
HAVE_LOGGER = 0
|
|
HAVE_FILE_LOGGER = 0
|
|
|
|
# system platform
|
|
system_platform = unix
|
|
ifeq ($(shell uname -a),)
|
|
EXE_EXT = .exe
|
|
system_platform = win
|
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
|
system_platform = osx
|
|
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
|
system_platform = win
|
|
endif
|
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
|
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
|
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
|
|
|
DOL_TARGET := retroarch-salamander_ngc.dol
|
|
ELF_TARGET := retroarch-salamander_ngc.elf
|
|
|
|
INCLUDE := -I. -I$(DEVKITPRO)/libogc/include
|
|
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/cube -L.
|
|
|
|
MACHDEP := -DGEKKO -DHW_DOL -mogc -mcpu=750 -meabi -mhard-float
|
|
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
|
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
|
|
LIBS := -lfat -logc
|
|
|
|
OBJ = gx/salamander/main.o console/rarch_console_exec.o console/rarch_console_libretro_mgmt.o file_path.o compat/compat.o conf/config_file.o ngc/ssaram.o ngc/sidestep.o
|
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
CFLAGS += -DHAVE_LOGGER
|
|
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
|
CFLAGS += -Iconsole/logger
|
|
OBJ += console/logger/logger.o
|
|
LIBS += -lbba
|
|
endif
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
CFLAGS += -Iconsole/logger
|
|
endif
|
|
|
|
CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_RARCH_EXEC -DHAVE_CONFIGFILE=1 -DGEKKO -DPACKAGE_VERSION=\"0.9.8-beta1\" -Wno-char-subscripts
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
CFLAGS += -O0 -g
|
|
else
|
|
CFLAGS += -O3
|
|
endif
|
|
|
|
all: $(DOL_TARGET)
|
|
|
|
%.dol: %.elf
|
|
$(ELF2DOL) $< $@
|
|
|
|
$(ELF_TARGET): $(OBJ)
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
pkg: all
|
|
cp -r $(DOL_TARGET) ngc/pkg/boot.dol
|
|
|
|
clean:
|
|
rm -f $(DOL_TARGET)
|
|
rm -f $(ELF_TARGET)
|
|
rm -f $(OBJ)
|
|
|
|
.PHONY: clean
|
|
|