mirror of
https://github.com/libretro/RetroArch.git
synced 2026-01-09 06:34:03 +08:00
-ffast-math was added in ff14092d8d0 with a comment that it "helps SINC resampler to auto-vectorize". The flag is an alias for "-fno-math-errno -funsafe-math-optimizations -ffp-contract=fast -fno-honor-infinities -fno-honor-nans". The last two of those cause compiler complaints because while the flag was meant for this file, it's shared across the codebase that includes statements that operate on infinities and NaNs. GCC 13.3 with -fopt-info-vec reports 18 vectorizations for `-O3 -ffast-math`, 17 for `-O3 -fno-math-errno -funsafe-math-optimizations -ffp-contract=fast` and also 17 for plain `-O3`. So using the subset of -ffast-math without the offending flags buys nothing and loses 1 vectorization. Both GCC and Clang provide the "fast-math" pragma directive, which I add to this one file that benefits from it, under the condition that it's supported. -ffast-math is removed from most of the makefiles.
87 lines
2.3 KiB
Makefile
87 lines
2.3 KiB
Makefile
HAVE_FILE_LOGGER = 0
|
|
DEBUG = 0
|
|
|
|
TARGET = retroarchvita_salamander
|
|
TITLE_ID = RETROVITA
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
OPTIMIZE_LV := -O0 -g
|
|
else
|
|
OPTIMIZE_LV := -O2
|
|
endif
|
|
|
|
PREFIX = arm-vita-eabi
|
|
CC = $(PREFIX)-gcc
|
|
|
|
INCDIR = libretro-common/include
|
|
CFLAGS = -Wl,-q $(OPTIMIZE_LV) -I$(INCDIR) -std=gnu99 -mfloat-abi=hard -fsingle-precision-constant -mword-relocations
|
|
ASFLAGS = $(CFLAGS)
|
|
|
|
RARCH_DEFINES = -DVITA -DIS_SALAMANDER -DRARCH_CONSOLE
|
|
|
|
LIBDIR =
|
|
LDFLAGS =
|
|
LIBS = -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -lSceAppUtil_stub\
|
|
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceAudio_stub -lSceFiber_stub\
|
|
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub -lSceMotion_stub \
|
|
-lSceMotion_stub -lSceAppMgr_stub -lfreetype -lpng -lm -lc
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
endif
|
|
|
|
CFLAGS += $(RARCH_DEFINES)
|
|
|
|
OBJS = frontend/frontend_salamander.o \
|
|
frontend/frontend_driver.o \
|
|
frontend/drivers/platform_psp.o \
|
|
libretro-common/file/file_path.o \
|
|
libretro-common/file/file_path_io.o \
|
|
libretro-common/string/stdstring.o \
|
|
libretro-common/lists/string_list.o \
|
|
libretro-common/lists/dir_list.o \
|
|
libretro-common/file/retro_dirent.o \
|
|
libretro-common/encodings/encoding_utf.o \
|
|
libretro-common/compat/compat_strl.o \
|
|
libretro-common/compat/compat_strldup.o \
|
|
libretro-common/compat/compat_strcasestr.o \
|
|
libretro-common/compat/fopen_utf8.o \
|
|
libretro-common/file/config_file.o \
|
|
libretro-common/streams/file_stream.o \
|
|
libretro-common/vfs/vfs_implementation.o \
|
|
libretro-common/hash/lrc_hash.o \
|
|
libretro-common/time/rtime.o \
|
|
verbosity.o
|
|
|
|
all: $(TARGET).vpk
|
|
|
|
%.vpk: eboot.bin
|
|
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "RetroArch" -d ATTRIBUTE2=12 param.sfo
|
|
vita-pack-vpk -s param.sfo -b eboot.bin $@
|
|
|
|
eboot.bin: $(TARGET).velf
|
|
vita-make-fself $< $@
|
|
|
|
%.velf: %.elf
|
|
vita-elf-create $< $@
|
|
|
|
$(TARGET).elf: $(OBJS)
|
|
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
|
|
|
|
%.o: %.png
|
|
$(PREFIX)-ld -r -b binary -o $@ $^
|
|
|
|
clean:
|
|
@rm -rf $(TARGET).vpk $(TARGET).velf $(TARGET).elf $(OBJS) \
|
|
eboot.bin param.sfo
|
|
|
|
vpksend: $(TARGET).vpk
|
|
curl -T $(TARGET).vpk ftp://$(PSVITAIP):1337/ux0:/
|
|
@echo "Sent."
|
|
|
|
PSVITAIP = 192.168.1.15
|
|
|
|
send: eboot.bin
|
|
curl -T eboot.bin ftp://$(PSVITAIP):1337/ux0:/app/$(TITLE_ID)/
|
|
@echo "Sent."
|