diff --git a/.gitignore b/.gitignore index ad6ea6ab19..1dfa7f9aa0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ *.elf *.dol *.map +.tmp +.tmp.c +.tmp.cxx config.log /retroarch /retroarch.cfg @@ -67,6 +70,19 @@ menu/driverspzarch.c *.depend *.rpx wiiu/wut/elf2rpl/elf2rpl +/pkg/wiiu/retroarch +/pkg/wiiu/wiiu +/pkg/wiiu/rpx + +# 3ds +/.lst +*.3dsx +*.cia +*.3ds +*.bnr +*.smdh +/retroarch_3ds.core +/retroarch_3ds.icn # Ctags /tags @@ -102,11 +118,13 @@ obj-unix/ /pkg/msvc/Release Cg/*.lpl /pkg/msvc/Release Cg/*.cfg /pkg/msvc/*.db +/pkg/msvc/.vs +/pkg/msvc/*/.vs /pkg/msvc/msvc-2010/Release Cg/RetroArc.27FF7CE1.tlog/*.tlog /pkg/msvc/msvc-2010/Release Cg/RetroArc.27FF7CE1.tlog/*.lastbuildstate /pkg/msvc/msvc-2010/Release Cg/*.log /pkg/msvc/msvc-2010/Release Cg/*.obj /pkg/msvc/msvc-2010/Release Cg/*.res /pkg/msvc/msvc-2010/Release Cg/*.pdb - retroarch.cfg +Makefile.local diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000000..81c2529184 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,125 @@ +{ + "configurations": [ + { + "name": "Mac", + "includePath": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "defines": [], + "intelliSenseMode": "clang-x64", + "browse": { + "path": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + }, + "macFrameworkPath": [ + "/System/Library/Frameworks", + "/Library/Frameworks" + ] + }, + { + "name": "Linux", + "includePath": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "defines": [], + "intelliSenseMode": "clang-x64", + "browse": { + "path": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + } + }, + { + "name": "Win32", + "includePath": [ + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt", + "${workspaceRoot}" + ], + "defines": [ + "_DEBUG", + "UNICODE" + ], + "intelliSenseMode": "msvc-x64", + "browse": { + "path": [ + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + } + }, + { + "name": "msys2-mingw32", + "includePath": [ + "C:/msys64/mingw32/include", + "C:/msys64/mingw32/i686-w64-mingw32/include", + "${workspaceRoot}/libretro-common/include", + "${workspaceRoot}/include", + "${workspaceRoot}" + ], + "defines": [ + "_DEBUG", + "UNICODE" + ], + "intelliSenseMode": "msvc-x64", + "browse": { + "path": [ + "C:/msys64/mingw32/include", + "C:/msys64/mingw32/i686-w64-mingw32/include", + "${workspaceRoot}/libretro-common/include", + "${workspaceRoot}/include", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + } + }, + { + "name": "msys2-mingw64", + "includePath": [ + "C:/msys64/mingw64/include", + "C:/msys64/mingw64/x86_64-w64-mingw32/include", + "${workspaceRoot}/libretro-common/include", + "${workspaceRoot}/include", + "${workspaceRoot}" + ], + "defines": [ + "_DEBUG", + "UNICODE" + ], + "intelliSenseMode": "msvc-x64", + "browse": { + "path": [ + "C:/msys64/mingw64/include", + "C:/msys64/mingw64/x86_64-w64-mingw32/include", + "${workspaceRoot}/libretro-common/include", + "${workspaceRoot}/include", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + } + } + ], + "version": 3 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 53837e538f..6e1f69631a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "MINGW64 (MSYS2) debug", + "name": "msys2-mingw64 debug", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/retroarch.exe", @@ -23,6 +23,26 @@ "ignoreFailures": true } ] + }, + { + "name": "msys2-mingw32 debug", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/retroarch.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "miDebuggerPath": "c:\\msys64\\mingw32\\bin\\gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 1fdc2bf309..e90ca77e4a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,4 +9,9 @@ "editor.tabSize": 3, "editor.renderWhitespace": "all", "editor.insertSpaces": true, + "files.associations": { + "frontend_driver.h": "c", + "*.in": "c", + "*.rh": "c" + }, } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 496810ecfa..b271c66e8f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ "version": "2.0.0", "tasks": [ { - "taskName": "Build", + "taskName": "msys2-mingw64 build", "type": "shell", "group": { @@ -22,7 +22,7 @@ } } { - "taskName": "Build with debugging symbols", + "taskName": "msys2-mingw64 build with debug symbols", "type": "shell", "group": "build", @@ -38,7 +38,7 @@ } } { - "taskName": "Build without reconfiguring", + "taskName": "msys2-mingw64 rebuild", "type": "shell", "group": "build", @@ -54,7 +54,7 @@ } } { - "taskName": "Clean", + "taskName": "msys2-mingw64 clean", "type": "shell", "group": "build", @@ -70,7 +70,7 @@ } } { - "taskName": "Start", + "taskName": "msys2-mingw64 run", "type": "shell", "group": { diff --git a/CHANGES.md b/CHANGES.md index 17bb6ec41b..83effa6e63 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,84 @@ -# 1.7.0 (future) -- CHEEVOS: Add badges +# 1.7.1 (future) +- 3DS: Now correctly reports amount of CPU cores. +- 3DS: Frontend rating is now correctly implemented for both New 3DS/2DS and Old 3DS/2DS. +- 3DS: Initial networking support, HTTP requests won't work yet. +- AUDIO: Added 'Audio Resampler Quality' setting to Audio Settings. Setting this higher will increase sound quality at the expense of sound latency and/or performance. Setting this value lower will improve sound latency/performance at the expense of sound quality. Only has an effect if the Sinc resampler is used, and you have to restart the game for changes to take effect. +- CHEEVOS: Fix unofficial achievements not being loaded. +- CHEEVOS: Show the menu entries when no achievements are found even if hardcore mode is enabled. +- CHEEVOS: Support Neo Geo Pocket. +- COMMON: Bugfix for issue related to 'Windows mouse pointer visible when running MESS or MAME cores'. +- COMMON: Fix bug 'Last item in a Playlist is ignored'. +- COMMON: New LED API. Driver implemented for Raspberry Pi, proof of concept implemented for core MAME 2003. +- DINPUT: don't reinitialize input driver on network events / media insertion / network drive connection +- GUI: Allow changing menu font color. +- GUI: Menu visibility options for RGUI and MaterialUI. +- GUI/XMB: Add Monochrome Inverted icon theme. +- GUI/XMB: Allow changing menu scale to 200%. +- KEYMAPPER: prevent a condition that caused input_menu_toggle to stop working when a RETRO_DEVICE_KEYBOARD type device is enabled +- LOCALIZATION: Update Italian translation. +- LOCALIZATION: Update Spanish translation. +- NSW: Initial Nintendo Switch port, based on libtransistor SDK. +- PS3: Enable Cheevos. +- PSP: Enable threading support through pthreads. +- WINDOWS: Improved Unicode support (for cores/directory creation and 7zip archives). +- WINDOWS: Show progress meter on taskbar for downloads (Windows 7 and up). +- WIIU: Overlay support. +- WIIU: Transparency support in menu + overlays. +- WIIU: New HID pad support. + +# 1.7.0 +- CHEEVOS: Add badges for achievements, shows thumbnail images of achievements. +- CHEEVOS: Leaderboard support. +- CHEEVOS: Only disable savestates on hardcore mode if achievements are not available. +- COMMANDLINE: Fix fullscreen toggle switch. +- COMMON: Add 'Automatically Load Content To Playlist' feature, enabled by default. +- COMMON: Fix slowmotion ratio always being reset back to 1. +- COMMON: Optimized NBIO implementations now for Apple, Windows, and Linux. Uses mmap for Linux/Windows/BSD if/when available. File I/O should now be much faster for loading images inside the menu. +- COMMON: Native Blissbox support now for latest firmware as of writing (2.0). Implementation through libusb and/or native Windows HID. +- COMMON: New lightgun API. +- COMMON: New VFS (Virtual File System) API. +- COMMON: Fixed some playlist bugs. +- COMMON: New snow shader. +- COMMON: Fix Quick Menu title, no longer shows 'Select File'. +- COMMON: Fix loading cores that require no content one after another. +- COMMON: Map Delete key to Y button for non-unified menu keyboard controls. +- COMMON: Fix for relative paths being normalised and generating a duplicate history entry. +- EMSCRIPTEN: Fix references to browserfs. +- FREEBSD: Support libusb HID input driver. +- HAIKU: Buildfix. +- INPUT: Map clear button to DEL key. +- LINUX/X11: Add RetroArch logo to window title bar. +- LINUX/X11: Input driver now supports new lightgun code. +- LINUX/X11: Support window transparency (requires a compositing window manager). +- LOBBIES: Fix for crash on join netplay rooms via touch / glui. +- LOCALIZATION: Update Italian translation. +- LOCALIZATION: Update Japanese translation. +- LOCALIZATION: Update Portuguese-Brazilian translation. +- LOCALIZATION: Update Polish translation. +- LOCALIZATION: Update Russian translation. +- MENU: Snowflake menu shader effect. +- OSX/PPC: Fix the GL2 renderchain, had to use EXT versions of framebuffer/renderbuffer functions. +- PS3: HTTP requests / downloads should now work. +- PS3: Core Updater now works. +- PS3: Improved font rendering, enable STB Unicode font renderer. +- PSP: Make it work with Vita's Adrenaline. +- PSP: Fix audio sync. +- PSP: Fix content loading, port should be functional again. +- PSP: Use 64MB when available. +- SCANNER: Fix crash from Windows-incompatible format string. +- VITA: Improve packaging, installation times. +- WIIU: Disabled the controller patcher for now since it was the source of many stability issues. +- VULKAN: Various stability fixes for WSI. +- WINDOWS: Add MSVC 2017 solution. +- WINDOWS: Get rid of the empty console window in MSVC 2010 builds. +- WINDOWS: Raw input driver now supports new lightgun code. +- WINDOWS: Use configured OSD/text message color on GDI driver. +- WINDOWS/XINPUT: Populate XInput VID/PID from DInput so autoconfig doesn't rely solely on joypad names +- WINDOWS/XINPUT: Fix crash that occurs in some situations with Steam running and a Steam Controller plugged in. +- WINDOWS: Improve version reporting under System Information. +- WINDOWS: Support window transparency. +- WINDOWS: Correct usage of GetWindowPlacement per MS docs, fixes game window position on Win95/98. +- WINDOWS: Added Visual Studio 2017 support. # 1.6.9 - COMMON: Small memory leak. diff --git a/Makefile b/Makefile index 8e70dd430d..9ec4f11672 100644 --- a/Makefile +++ b/Makefile @@ -9,13 +9,18 @@ endif include config.mk +# Put your favorite compile flags in this file, if you want different defaults than upstream. +# Do not attempt to create that file upstream. +# (It'd be better to put this comment in that file, but .gitignore doesn't work on files that exist in the repo.) +-include Makefile.local + TARGET = retroarch OBJDIR := obj-unix OBJ := LIBS := -DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_OVERLAY +DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' ifneq ($(findstring BSD,$(OS)),) @@ -74,7 +79,7 @@ ifneq ($(findstring Win32,$(OS)),) LDFLAGS += -mwindows endif -CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) $(DEBUG_FLAG) -I. -Ideps -Ideps/stb +CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb APPEND_CFLAGS := $(CFLAGS) CXXFLAGS += $(APPEND_CFLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS @@ -205,13 +210,6 @@ install: $(TARGET) mkdir -p $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/glui; \ cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/retroarch/assets; \ cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/retroarch/assets; \ - echo "Removing unneeded source image files.."; \ - rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/flatui/src; \ - rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/monochrome/src; \ - rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/retroactive/src; \ - rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/neoactive/src; \ - rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/retrosystem/src; \ - rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/dot-art/src; \ echo "Asset copying done."; \ fi diff --git a/Makefile.common b/Makefile.common index 58158f33aa..885d94eefc 100644 --- a/Makefile.common +++ b/Makefile.common @@ -127,13 +127,14 @@ ifeq ($(HAVE_UNIX), 1) OBJ += frontend/drivers/platform_unix.o endif +ifeq ($(TARGET), retroarch_3ds) + OBJ += frontend/drivers/platform_ctr.o +endif + ifeq ($(findstring Haiku,$(OS)),) LIBS += -lm - DEBUG_FLAG = -g else LIBS += -lroot -lnetwork - # stable and nightly haiku builds are stuck on gdb 6.x but we use gcc4 - DEBUG_FLAG = -gdwarf-2 endif # Git @@ -170,6 +171,7 @@ OBJ += frontend/frontend.o \ tasks/task_audio_mixer.o \ $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \ $(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o \ + $(LIBRETRO_COMM_DIR)/compat/fopen_utf8.o \ $(LIBRETRO_COMM_DIR)/lists/file_list.o \ $(LIBRETRO_COMM_DIR)/lists/dir_list.o \ $(LIBRETRO_COMM_DIR)/file/retro_dirent.o \ @@ -178,6 +180,7 @@ OBJ += frontend/frontend.o \ $(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.o \ $(LIBRETRO_COMM_DIR)/streams/interface_stream.o \ $(LIBRETRO_COMM_DIR)/streams/memory_stream.o \ + $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.o \ $(LIBRETRO_COMM_DIR)/lists/string_list.o \ $(LIBRETRO_COMM_DIR)/string/stdstring.o \ $(LIBRETRO_COMM_DIR)/memmap/memalign.o \ @@ -195,7 +198,10 @@ OBJ += frontend/frontend.o \ audio/audio_driver.o \ $(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \ input/input_driver.o \ + led/led_driver.o \ + led/null_led_driver.o \ gfx/video_coord_array.o \ + gfx/video_display_server.o \ gfx/video_driver.o \ camera/camera_driver.o \ wifi/wifi_driver.o \ @@ -213,8 +219,6 @@ OBJ += frontend/frontend.o \ input/input_autodetect_builtin.o \ input/input_keymaps.o \ input/input_remapping.o \ - tasks/task_overlay.o \ - input/input_overlay.o \ $(LIBRETRO_COMM_DIR)/queues/fifo_queue.o \ managers/core_option_manager.o \ $(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.o \ @@ -242,6 +246,7 @@ OBJ += frontend/frontend.o \ camera/drivers/nullcamera.o \ wifi/drivers/nullwifi.o \ gfx/drivers/nullgfx.o \ + gfx/display_servers/dispserv_null.o \ audio/drivers/nullaudio.o \ input/drivers/nullinput.o \ input/drivers_hid/null_hid.o \ @@ -534,7 +539,6 @@ OBJ += deps/libui/libui_main.o endif endif - # Miscellaneous ifeq ($(HAVE_STDIN_CMD), 1) @@ -569,12 +573,21 @@ ifeq ($(HAVE_CORETEXT), 1) OBJ += gfx/drivers_font_renderer/coretext.o endif +ifeq ($(TARGET), retroarch_3ds) + OBJ += gfx/drivers_font/ctr_font.o +endif + ifeq ($(HAVE_OSS), 1) OBJ += audio/drivers/oss.o else ifeq ($(HAVE_OSS_BSD), 1) OBJ += audio/drivers/oss.o endif +ifeq ($(TARGET), retroarch_3ds) + OBJ += audio/drivers/ctr_csnd_audio.o \ + audio/drivers/ctr_dsp_audio.o +endif + ifeq ($(HAVE_ALSA), 1) OBJ += audio/drivers/alsa.o @@ -634,7 +647,8 @@ endif ifeq ($(HAVE_DSOUND), 1) OBJ += audio/drivers/dsound.o DEFINES += -DHAVE_DSOUND - LIBS += -ldxguid -ldsound + HAVE_DX_COMMON = 1 + LIBS += -ldsound endif ifeq ($(HAVE_WASAPI), 1) @@ -655,13 +669,7 @@ ifeq ($(HAVE_NEON),1) OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \ audio/drivers_resampler/cc_resampler_neon.o \ memory/neon/memcpy-neon.o - # When compiled without this, tries to attempt to compile sinc lerp, - # which will error out - # - # TODO - we need to make quality levels of sinc - # runtime toggleable instead of going by compile-time - # defines - DEFINES += -DSINC_LOWER_QUALITY + DEFINES += -DHAVE_NEON endif OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \ @@ -674,14 +682,6 @@ ifeq ($(HAVE_NEON),1) $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o endif -ifneq ($(findstring Win32,$(OS)),) - # if user explicitly sets --disable-vulkan on Windows, then disable it - ifneq ($(HAVE_NO_VULKAN),1) - HAVE_VULKAN=1 - DEFINES += -DHAVE_VULKAN - endif -endif - HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI) ifeq ($(HW_CONTEXT_MENU_DRIVERS),0) @@ -757,6 +757,7 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/menu_event.o \ menu/menu_entries.o \ menu/menu_setting.o \ + menu/menu_networking.o \ menu/menu_shader.o \ menu/widgets/menu_filebrowser.o \ menu/widgets/menu_dialog.o \ @@ -792,6 +793,10 @@ endif ifeq ($(HAVE_OVERLAY), 1) DEFINES += -DHAVE_OVERLAY + OBJ += \ + tasks/task_overlay.o \ + input/input_overlay.o \ + led/overlay_led_driver.o endif ifeq ($(HAVE_STB_FONT), 1) @@ -844,6 +849,20 @@ endif CFLAGS += -I$(DEPS_DIR)/libvita2d/include endif +ifeq ($(TARGET), retroarch_3ds) + OBJ += gfx/drivers/ctr_gfx.o \ + menu/drivers_display/menu_display_ctr.o \ + input/drivers/ctr_input.o \ + input/drivers_joypad/ctr_joypad.o +endif + +ifeq ($(TARGET), retroarch_switch) + OBJ += gfx/drivers/switch_gfx.o \ + input/drivers/switch_input.o \ + input/drivers_joypad/switch_joypad.o \ + audio/drivers/switch_audio.o +endif + ifeq ($(HAVE_WAYLAND), 1) OBJ += gfx/drivers_context/wayland_ctx.o \ input/drivers/wayland_input.o @@ -854,7 +873,8 @@ endif #Input ifeq ($(HAVE_DINPUT), 1) - LIBS += -ldinput8 -ldxguid -lole32 + HAVE_DX_COMMON = 1 + LIBS += -ldinput8 -lole32 DEFINES += -DHAVE_DINPUT OBJ += input/drivers/dinput.o \ input/drivers_joypad/dinput_joypad.o @@ -874,12 +894,12 @@ endif ifeq ($(HAVE_X11), 1) OBJ += input/common/input_x11_common.o \ input/drivers/x11_input.o \ - gfx/common/dbus_common.o \ gfx/common/x11_common.o \ - gfx/common/xinerama_common.o + gfx/common/xinerama_common.o \ + gfx/display_servers/dispserv_x11.o LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) - DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS) + DEFINES += -DHAVE_X11 $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS) ifeq ($(HAVE_XCB),1) LIBS += -lX11-xcb endif @@ -902,6 +922,7 @@ endif ifeq ($(HAVE_DBUS), 1) LIBS += $(DBUS_LIBS) CFLAGS += $(DBUS_CFLAGS) + OBJ += gfx/common/dbus_common.o endif ifeq ($(HAVE_UDEV), 1) @@ -1240,8 +1261,18 @@ endif ifeq ($(HAVE_D3D9), 1) HAVE_D3D_COMMON = 1 + HAVE_D3DX = 1 DEFINES += -DHAVE_D3D9 - LIBS += -ld3d9 -ld3dx9 -ldxguid +ifeq ($(HAVE_D3DX), 1) + DEFINES += -DHAVE_D3DX +endif +ifneq ($(HAVE_DYLIB), 1) + LIBS += -ld3d9 +ifeq ($(HAVE_D3DX), 1) + LIBS += -ld3dx9 +endif +endif + HAVE_DX_COMMON = 1 OBJ += gfx/drivers_font/d3d_w32_font.o ifeq ($(HAVE_CG), 1) LIBS += -lcgD3D9 @@ -1249,20 +1280,29 @@ ifeq ($(HAVE_D3D9), 1) endif ifeq ($(HAVE_HLSL), 1) - LIBS += -lcgD3D9 OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o \ - gfx/drivers_shader/shader_hlsl.o + gfx/drivers_shader/shader_hlsl.o endif endif ifeq ($(HAVE_D3D8), 1) HAVE_D3D_COMMON = 1 + HAVE_DX_COMMON = 1 DEFINES += -DHAVE_D3D8 - LIBS += -ld3d8 -ld3dx8 -ldxguid +ifneq ($(HAVE_DYLIB), 1) + LIBS += -ld3d8 +ifeq ($(HAVE_D3DX), 1) + LIBS += -ld3dx8 +endif +endif OBJ += gfx/drivers_renderchain/d3d8_renderchain.o endif +ifeq ($(HAVE_DX_COMMON), 1) + LIBS += -ldxguid +endif + ifeq ($(HAVE_D3D_COMMON), 1) DEFINES += -DHAVE_D3D OBJ += gfx/drivers/d3d.o \ @@ -1309,9 +1349,14 @@ ifeq ($(HAVE_7ZIP),1) $(7ZOBJ) endif -ifeq ($(HAVE_FLAC),1) - CFLAGS += -I$(DEPS_DIR)/libFLAC/include - DEFINES += -DHAVE_FLAC -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \ +ifeq ($(HAVE_IBXM), 1) + DEFINES += -DHAVE_IBXM + OBJ += $(DEPS_DIR)/ibxm/ibxm.o +endif + +ifeq ($(HAVE_BUILTINFLAC),1) + CFLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include + DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \ -DFLAC_PACKAGE_VERSION="\"retroarch\"" FLACOBJ = $(DEPS_DIR)/libFLAC/bitmath.o \ $(DEPS_DIR)/libFLAC/bitreader.o \ @@ -1335,22 +1380,52 @@ ifeq ($(HAVE_FLAC),1) FLACOBJ += $(DEPS_DIR)/libFLAC/windows_unicode_filenames.o endif OBJ += $(FLACOBJ) +else ifeq ($(HAVE_FLAC),1) + LIBS += $(FLAC_LIBS) endif ifeq ($(HAVE_ZLIB), 1) OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_zlib.o \ $(LIBRETRO_COMM_DIR)/streams/trans_stream_zlib.o - OBJ += $(ZLIB_OBJS) DEFINES += -DHAVE_ZLIB HAVE_COMPRESSION = 1 ifeq ($(HAVE_BUILTINZLIB), 1) + OBJ += $(DEPS_DIR)/libz/adler32.o \ + $(DEPS_DIR)/libz/compress.o \ + $(DEPS_DIR)/libz/crc32.o \ + $(DEPS_DIR)/libz/deflate.o \ + $(DEPS_DIR)/libz/gzclose.o \ + $(DEPS_DIR)/libz/gzlib.o \ + $(DEPS_DIR)/libz/gzread.o \ + $(DEPS_DIR)/libz/gzwrite.o \ + $(DEPS_DIR)/libz/inffast.o \ + $(DEPS_DIR)/libz/inflate.o \ + $(DEPS_DIR)/libz/inftrees.o \ + $(DEPS_DIR)/libz/trees.o \ + $(DEPS_DIR)/libz/uncompr.o \ + $(DEPS_DIR)/libz/zutil.o INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include/compat DEFINES += -DWANT_ZLIB else - LIBS += -lz + LIBS += $(ZLIB_LIBS) endif endif +ifeq ($(HAVE_FLAC), 1) +ifeq ($(HAVE_7ZIP), 1) +ifeq ($(HAVE_ZLIB), 1) + DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR + CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr + OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/bitstream.o \ + $(LIBRETRO_COMM_DIR)/formats/libchdr/cdrom.o \ + $(LIBRETRO_COMM_DIR)/formats/libchdr/chd.o \ + $(LIBRETRO_COMM_DIR)/formats/libchdr/flac.o \ + $(LIBRETRO_COMM_DIR)/formats/libchdr/huffman.o \ + $(LIBRETRO_COMM_DIR)/streams/chd_stream.o +endif +endif +endif + ifeq ($(HAVE_RTGA), 1) DEFINES += -DHAVE_RTGA OBJ += $(LIBRETRO_COMM_DIR)/formats/tga/rtga.o @@ -1372,11 +1447,6 @@ ifeq ($(HAVE_RBMP), 1) OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp.o endif -ifeq ($(HAVE_IBXM), 1) - DEFINES += -DHAVE_IBXM - OBJ += $(DEPS_DIR)/ibxm/ibxm.o -endif - OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \ $(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \ $(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.o \ @@ -1386,40 +1456,6 @@ ifdef HAVE_COMPRESSION DEFINES += -DHAVE_COMPRESSION endif -ifeq ($(HAVE_BUILTINZLIB),1) - OBJ += $(DEPS_DIR)/libz/adler32.o \ - $(DEPS_DIR)/libz/compress.o \ - $(DEPS_DIR)/libz/crc32.o \ - $(DEPS_DIR)/libz/deflate.o \ - $(DEPS_DIR)/libz/gzclose.o \ - $(DEPS_DIR)/libz/gzlib.o \ - $(DEPS_DIR)/libz/gzread.o \ - $(DEPS_DIR)/libz/gzwrite.o \ - $(DEPS_DIR)/libz/inffast.o \ - $(DEPS_DIR)/libz/inflate.o \ - $(DEPS_DIR)/libz/inftrees.o \ - $(DEPS_DIR)/libz/trees.o \ - $(DEPS_DIR)/libz/uncompr.o \ - $(DEPS_DIR)/libz/zutil.o -else -ifeq ($(HAVE_ZLIB),1) -OBJ += $(ZLIB_OBJS) -endif -endif - -ifeq ($(HAVE_7ZIP),1) -ifeq ($(HAVE_FLAC),1) - DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR - CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr - OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/bitstream.o \ - $(LIBRETRO_COMM_DIR)/formats/libchdr/cdrom.o \ - $(LIBRETRO_COMM_DIR)/formats/libchdr/chd.o \ - $(LIBRETRO_COMM_DIR)/formats/libchdr/flac.o \ - $(LIBRETRO_COMM_DIR)/formats/libchdr/huffman.o \ - $(LIBRETRO_COMM_DIR)/streams/chd_stream.o -endif -endif - # Video4Linux 2 ifeq ($(HAVE_V4L2),1) @@ -1497,27 +1533,24 @@ ifeq ($(HAVE_NETWORKING), 1) cores/libretro-net-retropad/net_retropad_core.o endif - ifeq ($(HAVE_MINIUPNPC), 1) - ifeq ($(HAVE_BUILTINMINIUPNPC), 1) - DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR - DEFINES += -I$(DEPS_DIR) - OBJ += \ - $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \ - $(DEPS_DIR)/miniupnpc/upnpreplyparse.o \ - $(DEPS_DIR)/miniupnpc/upnpcommands.o \ - $(DEPS_DIR)/miniupnpc/upnperrors.o \ - $(DEPS_DIR)/miniupnpc/connecthostport.o \ - $(DEPS_DIR)/miniupnpc/portlistingparse.o \ - $(DEPS_DIR)/miniupnpc/receivedata.o \ - $(DEPS_DIR)/miniupnpc/upnpdev.o \ - $(DEPS_DIR)/miniupnpc/minissdpc.o \ - $(DEPS_DIR)/miniupnpc/miniwget.o \ - $(DEPS_DIR)/miniupnpc/miniupnpc.o \ - $(DEPS_DIR)/miniupnpc/minixml.o \ - $(DEPS_DIR)/miniupnpc/minisoap.o - else - LIBS += $(MINIUPNPC_LIBS) - endif + ifeq ($(HAVE_BUILTINMINIUPNPC), 1) + DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR + DEFINES += -I$(DEPS_DIR) + OBJ += $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \ + $(DEPS_DIR)/miniupnpc/upnpreplyparse.o \ + $(DEPS_DIR)/miniupnpc/upnpcommands.o \ + $(DEPS_DIR)/miniupnpc/upnperrors.o \ + $(DEPS_DIR)/miniupnpc/connecthostport.o \ + $(DEPS_DIR)/miniupnpc/portlistingparse.o \ + $(DEPS_DIR)/miniupnpc/receivedata.o \ + $(DEPS_DIR)/miniupnpc/upnpdev.o \ + $(DEPS_DIR)/miniupnpc/minissdpc.o \ + $(DEPS_DIR)/miniupnpc/miniwget.o \ + $(DEPS_DIR)/miniupnpc/miniupnpc.o \ + $(DEPS_DIR)/miniupnpc/minixml.o \ + $(DEPS_DIR)/miniupnpc/minisoap.o + else ifeq ($(HAVE_MINIUPNPC), 1) + LIBS += $(MINIUPNPC_LIBS) endif endif @@ -1529,6 +1562,7 @@ ifneq ($(findstring Win32,$(OS)),) OBJ += gfx/drivers/gdi_gfx.o \ gfx/drivers_context/gdi_ctx.o \ gfx/drivers_font/gdi_font.o \ + gfx/display_servers/dispserv_win32.o \ menu/drivers_display/menu_display_gdi.o LIBS += -lmsimg32 -lhid -lsetupapi @@ -1583,3 +1617,54 @@ ifneq ($(findstring DOS,$(OS)),) OBJ += menu/drivers_display/menu_display_vga.o endif endif + +ifeq ($(HAVE_STATIC_VIDEO_FILTERS), 1) +OBJ += gfx/video_filters/2xsai.o \ + gfx/video_filters/super2xsai.o \ + gfx/video_filters/supereagle.o \ + gfx/video_filters/2xbr.o \ + gfx/video_filters/darken.o \ + gfx/video_filters/epx.o \ + gfx/video_filters/scale2x.o \ + gfx/video_filters/blargg_ntsc_snes.o \ + gfx/video_filters/lq2x.o \ + gfx/video_filters/phosphor2x.o +endif + +ifeq ($(WANT_IOSUHAX), 1) +DEFINES += -I$(DEPS_DIR)/libiosuhax +CFLAGS += -I$(DEPS_DIR)/libiosuhax +OBJ += $(DEPS_DIR)/libiosuhax/iosuhax.o \ + $(DEPS_DIR)/libiosuhax/iosuhax_devoptab.o \ + $(DEPS_DIR)/libiosuhax/iosuhax_disc_interface.o +endif + +ifeq ($(WANT_LIBFAT), 1) +DEFINES += -I$(DEPS_DIR)/libfat/include +CFLAGS += -I$(DEPS_DIR)/libfat/include +OBJ += $(DEPS_DIR)/libfat/cache.o \ + $(DEPS_DIR)/libfat/directory.o \ + $(DEPS_DIR)/libfat/disc.o \ + $(DEPS_DIR)/libfat/fatdir.o \ + $(DEPS_DIR)/libfat/fatfile.o \ + $(DEPS_DIR)/libfat/file_allocation_table.o \ + $(DEPS_DIR)/libfat/filetime.o \ + $(DEPS_DIR)/libfat/libfat.o \ + $(DEPS_DIR)/libfat/lock.o \ + $(DEPS_DIR)/libfat/partition.o +endif + +ifeq ($(HAVE_STATIC_AUDIO_FILTERS), 1) +OBJ += libretro-common/audio/dsp_filters/echo.o \ + libretro-common/audio/dsp_filters/eq.o \ + libretro-common/audio/dsp_filters/chorus.o \ + libretro-common/audio/dsp_filters/iir.o \ + libretro-common/audio/dsp_filters/panning.o \ + libretro-common/audio/dsp_filters/phaser.o \ + libretro-common/audio/dsp_filters/reverb.o \ + libretro-common/audio/dsp_filters/wahwah.o +endif + +ifeq ($(HAVE_RPILED), 1) + OBJ += led/rpi_led_driver.o +endif diff --git a/Makefile.ctr b/Makefile.ctr index c277d3df77..9a2ee1cfc9 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -9,8 +9,8 @@ BUILD_3DS = 1 BUILD_CIA = 1 LIBCTRU_NO_DEPRECATION = 1 -APP_TITLE = Retroarch 3DS -APP_DESCRIPTION = Retroarch 3DS +APP_TITLE = RetroArch 3DS +APP_DESCRIPTION = RetroArch 3DS APP_AUTHOR = Team Libretro APP_PRODUCT_CODE = RETROARCH-3DS APP_UNIQUE_ID = 0xBAC00 @@ -46,6 +46,9 @@ ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB + DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DHAVE_SOCKET_LEGACY + #-DHAVE_SSL -DMBEDTLS_SSL_DEBUG_ALL + #ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file else HAVE_CC_RESAMPLER = 1 HAVE_MENU_COMMON = 1 @@ -61,44 +64,22 @@ else HAVE_ZARCH = 0 HAVE_MATERIALUI = 1 HAVE_XMB = 1 + HAVE_STATIC_VIDEO_FILTERS = 1 + HAVE_STATIC_AUDIO_FILTERS = 1 + HAVE_NETWORKING = 1 + HAVE_CHEEVOS = 1 + HAVE_SOCKET_LEGACY = 1 + HAVE_SSL = 1 include Makefile.common BLACKLIST := BLACKLIST += input/input_overlay.o BLACKLIST += tasks/task_overlay.o OBJ := $(filter-out $(BLACKLIST),$(OBJ)) - - OBJ += gfx/drivers/ctr_gfx.o - OBJ += gfx/drivers_font/ctr_font.o - OBJ += menu/drivers_display/menu_display_ctr.o - OBJ += input/drivers/ctr_input.o - OBJ += input/drivers_joypad/ctr_joypad.o - OBJ += audio/drivers/ctr_csnd_audio.o - OBJ += audio/drivers/ctr_dsp_audio.o - OBJ += frontend/drivers/platform_ctr.o - OBJ += gfx/video_filters/2xsai.o - OBJ += gfx/video_filters/super2xsai.o - OBJ += gfx/video_filters/supereagle.o - OBJ += gfx/video_filters/2xbr.o - OBJ += gfx/video_filters/darken.o - OBJ += gfx/video_filters/epx.o - OBJ += gfx/video_filters/scale2x.o - OBJ += gfx/video_filters/blargg_ntsc_snes.o - OBJ += gfx/video_filters/lq2x.o - OBJ += gfx/video_filters/phosphor2x.o - OBJ += libretro-common/audio/dsp_filters/echo.o - OBJ += libretro-common/audio/dsp_filters/eq.o - OBJ += libretro-common/audio/dsp_filters/chorus.o - OBJ += libretro-common/audio/dsp_filters/iir.o - OBJ += libretro-common/audio/dsp_filters/panning.o - OBJ += libretro-common/audio/dsp_filters/phaser.o - OBJ += libretro-common/audio/dsp_filters/reverb.o - OBJ += libretro-common/audio/dsp_filters/wahwah.o endif - ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=devkitpro") + $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=devkitpro") endif ifeq ($(strip $(CTRULIB)),) @@ -144,7 +125,7 @@ endif CFLAGS += -I. -Ideps -Ideps/libz -Ideps/7zip -Ideps/stb -Ilibretro-common/include -CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -DSINC_LOWEST_QUALITY +CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES) CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 @@ -155,19 +136,25 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) CFLAGS += -std=gnu99 -ffast-math -LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lctru -lm +LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm + +ifeq ($(DEBUG), 1) + LIBS += -lctrud +else + LIBS += -lctru +endif ifeq ($(BUILD_3DSX), 1) -TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh + TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh endif ifeq ($(BUILD_3DS), 1) -TARGET_3DS := $(TARGET).3ds + TARGET_3DS := $(TARGET).3ds endif ifeq ($(BUILD_CIA), 1) -TARGET_CIA := $(TARGET).cia + TARGET_CIA := $(TARGET).cia endif .PHONY: $(BUILD) clean all @@ -178,7 +165,7 @@ $(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).core $(TARGET).3dsx: $(TARGET).elf $(TARGET).elf: $(OBJ) libretro_ctr.a -PREFIX := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi- +PREFIX := $(DEVKITARM)/bin/arm-none-eabi- CC := $(PREFIX)gcc CXX := $(PREFIX)g++ @@ -189,25 +176,38 @@ STRIP := $(PREFIX)strip NM := $(PREFIX)nm LD := $(CXX) -ifneq ($(findstring Linux,$(shell uname -a)),) - MAKEROM = pkg/ctr/tools/makerom-linux - BANNERTOOL = pkg/ctr/tools/bannertool-linux -else ifneq ($(findstring Darwin,$(shell uname -a)),) - MAKEROM = pkg/ctr/tools/makerom-mac - BANNERTOOL = pkg/ctr/tools/bannertool-mac +ifeq ($(strip $(CTRBANNERTOOL)),) + ifneq ($(findstring Linux,$(shell uname)),) + BANNERTOOL = pkg/ctr/tools/bannertool-linux + else ifneq ($(findstring Darwin,$(shell uname)),) + BANNERTOOL = pkg/ctr/tools/bannertool-mac + else + BANNERTOOL = pkg/ctr/tools/bannertool.exe + endif else - MAKEROM = pkg/ctr/tools/makerom.exe - BANNERTOOL = pkg/ctr/tools/bannertool.exe + BANNERTOOL = $(CTRBANNERTOOL) +endif + +ifeq ($(strip $(CTRMAKEROM)),) + ifneq ($(findstring Linux,$(shell uname)),) + MAKEROM = pkg/ctr/tools/makerom-linux + else ifneq ($(findstring Darwin,$(shell uname)),) + MAKEROM = pkg/ctr/tools/makerom-mac + else + MAKEROM = pkg/ctr/tools/makerom.exe + endif +else + MAKEROM = $(CTRMAKEROM) endif %.o: %.vsh %.gsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.vsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.cpp @@ -228,7 +228,7 @@ endif %.vsh: $(TARGET).smdh: $(APP_ICON) - $(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ + $(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ $(TARGET).3dsx: $(TARGET).elf ifeq ($(APP_BIG_TEXT_SECTION), 1) @@ -236,7 +236,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1) else rm -f $(TARGET).xml endif - $(DEVKITPRO)/devkitARM/bin/3dsxtool $< $@ $(_3DSXFLAGS) + $(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS) $(TARGET).elf: ctr/3dsx_custom_crt0.o $(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@ diff --git a/Makefile.ctr.salamander b/Makefile.ctr.salamander index 930b5badc7..f356cd9e78 100644 --- a/Makefile.ctr.salamander +++ b/Makefile.ctr.salamander @@ -35,6 +35,7 @@ OBJ := ctr/ctr_system.o \ libretro-common/compat/compat_strl.o \ libretro-common/file/config_file.o \ libretro-common/streams/file_stream.o \ + libretro-common/vfs/vfs_implementation.o \ libretro-common/hash/rhash.o \ file_path_str.o \ verbosity.o @@ -110,7 +111,7 @@ $(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).3dsx: $(TARGET).elf $(TARGET).elf: $(OBJ) -PREFIX := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi- +PREFIX := $(DEVKITARM)/bin/arm-none-eabi- CC := $(PREFIX)gcc CXX := $(PREFIX)g++ @@ -121,25 +122,38 @@ STRIP := $(PREFIX)strip NM := $(PREFIX)nm LD := $(CXX) -ifneq ($(findstring Linux,$(shell uname -a)),) - MAKEROM = pkg/ctr/tools/makerom-linux - BANNERTOOL = pkg/ctr/tools/bannertool-linux -else ifneq ($(findstring Darwin,$(shell uname -a)),) - MAKEROM = pkg/ctr/tools/makerom-mac - BANNERTOOL = pkg/ctr/tools/bannertool-mac +ifeq ($(strip $(CTRBANNERTOOL)),) + ifneq ($(findstring Linux,$(shell uname)),) + BANNERTOOL = pkg/ctr/tools/bannertool-linux + else ifneq ($(findstring Darwin,$(shell uname)),) + BANNERTOOL = pkg/ctr/tools/bannertool-mac + else + BANNERTOOL = pkg/ctr/tools/bannertool.exe + endif else - MAKEROM = pkg/ctr/tools/makerom.exe - BANNERTOOL = pkg/ctr/tools/bannertool.exe + BANNERTOOL = $(CTRBANNERTOOL) +endif + +ifeq ($(strip $(CTRMAKEROM)),) + ifneq ($(findstring Linux,$(shell uname)),) + MAKEROM = pkg/ctr/tools/makerom-linux + else ifneq ($(findstring Darwin,$(shell uname)),) + MAKEROM = pkg/ctr/tools/makerom-mac + else + MAKEROM = pkg/ctr/tools/makerom.exe + endif +else + MAKEROM = $(CTRMAKEROM) endif %.o: %.vsh %.gsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.vsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.cpp @@ -160,7 +174,7 @@ endif %.vsh: $(TARGET).smdh: $(APP_ICON) - $(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ + $(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ $(TARGET).3dsx: $(TARGET).elf ifeq ($(APP_BIG_TEXT_SECTION), 1) diff --git a/Makefile.emscripten b/Makefile.emscripten index fb3a215339..e191cfd874 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -20,6 +20,8 @@ HAVE_SDL = 0 HAVE_SDL2 = 1 HAVE_ZLIB = 1 WANT_ZLIB = 1 +HAVE_STATIC_VIDEO_FILTERS = 1 +HAVE_STATIC_AUDIO_FILTERS = 1 MEMORY = 536870912 # XXX: setting this to 1/2 currently crashes Firefox nightly @@ -51,26 +53,6 @@ endif include Makefile.common -OBJ += gfx/video_filters/2xsai.o -OBJ += gfx/video_filters/super2xsai.o -OBJ += gfx/video_filters/supereagle.o -OBJ += gfx/video_filters/2xbr.o -OBJ += gfx/video_filters/darken.o -OBJ += gfx/video_filters/epx.o -OBJ += gfx/video_filters/scale2x.o -OBJ += gfx/video_filters/blargg_ntsc_snes.o -OBJ += gfx/video_filters/lq2x.o -OBJ += gfx/video_filters/phosphor2x.o - -OBJ += libretro-common/audio/dsp_filters/echo.o -OBJ += libretro-common/audio/dsp_filters/eq.o -OBJ += libretro-common/audio/dsp_filters/chorus.o -OBJ += libretro-common/audio/dsp_filters/iir.o -OBJ += libretro-common/audio/dsp_filters/panning.o -OBJ += libretro-common/audio/dsp_filters/phaser.o -OBJ += libretro-common/audio/dsp_filters/reverb.o -OBJ += libretro-common/audio/dsp_filters/wahwah.o - CFLAGS += -Ideps/libz -Ideps -Ideps/stb libretro = libretro_emscripten.bc diff --git a/Makefile.griffin b/Makefile.griffin index 5e2217dd6e..182281628b 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -763,7 +763,7 @@ endif ifneq (,$(findstring msvc,$(platform))) CFLAGS += -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL else - CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL + CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL endif ifeq ($(HAVE_MATERIALUI), 1) @@ -832,7 +832,7 @@ ifeq ($(DEBUG), 1) CFLAGS += -Wp64 endif - CFLAGS += -Od -Zi -D_DEBUG -MTd -TP + CFLAGS += -Od -Zi -D_DEBUG -MTd LDFLAGS += -DEBUG else CFLAGS += -O0 -g -DDEBUG @@ -844,9 +844,10 @@ else ifeq ($(platform), vita) else ifneq (,$(findstring msvc,$(platform))) ifeq ($(platform), windows_msvc2003_x86) CFLAGS += -Wp64 + LDFLAGS += -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup endif - CFLAGS += -O2 -DNDEBUG -MT -TP + CFLAGS += -O2 -DNDEBUG -MT else CFLAGS += -O3 endif diff --git a/Makefile.openpandora b/Makefile.openpandora index a17adf5afc..443bdeec4c 100644 --- a/Makefile.openpandora +++ b/Makefile.openpandora @@ -15,7 +15,7 @@ LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL -DEFINES += -D__ARM_ARCH_6__ -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ +DEFINES += -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ DEFINES += $(INCDIRS) DEFINES += -D__OPENPANDORA__ -DPANDORA DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize diff --git a/Makefile.ps3 b/Makefile.ps3 index b23e55327a..3b0a80b32c 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -63,7 +63,19 @@ endif PPU_SRCS = griffin/griffin.c -DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS +DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT + +ifeq ($(DEX_BUILD), 1) +DEFINES += -DDEX_BUILD +endif + +ifeq ($(CEX_BUILD), 1) +DEFINES += -DCEX_BUILD +endif + +ifeq ($(ODE_BUILD), 1) +DEFINES += -DODE_BUILD +endif ifeq ($(HAVE_GCMGL), 1) DEFINES += -DHAVE_GCMGL @@ -101,7 +113,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN +DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS #DEFINES += -DHAVE_IMAGEVIEWER diff --git a/Makefile.ps3.cobra b/Makefile.ps3.cobra index d3f95fee52..2140ef1fb7 100644 --- a/Makefile.ps3.cobra +++ b/Makefile.ps3.cobra @@ -63,6 +63,18 @@ PPU_SRCS = griffin/griffin.c DEFINES += -DHAVE_RGUI -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_MENU -DRARCH_INTERNAL +ifeq ($(DEX_BUILD), 1) +DEFINES += -DDEX_BUILD +endif + +ifeq ($(CEX_BUILD), 1) +DEFINES += -DCEX_BUILD +endif + +ifeq ($(ODE_BUILD), 1) +DEFINES += -DODE_BUILD +endif + ifeq ($(HAVE_GCMGL), 1) DEFINES += -DHAVE_GCMGL GL_LIBS := -L. -lrgl_ps3 @@ -99,7 +111,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS +DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/Makefile.ps3.salamander b/Makefile.ps3.salamander index ab51d0db4d..49c8c9a719 100644 --- a/Makefile.ps3.salamander +++ b/Makefile.ps3.salamander @@ -27,6 +27,18 @@ STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ideps/libz DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC +ifeq ($(DEX_BUILD), 1) +DEFINES += -DDEX_BUILD +endif + +ifeq ($(CEX_BUILD), 1) +DEFINES += -DCEX_BUILD +endif + +ifeq ($(ODE_BUILD), 1) +DEFINES += -DODE_BUILD +endif + PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES) PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES) @@ -44,6 +56,7 @@ PPU_SRCS = frontend/frontend_salamander.c \ libretro-common/compat/compat_strl.c \ libretro-common/compat/compat_strcasestr.c \ libretro-common/streams/file_stream.c \ + libretro-common/vfs/vfs_implementation.c \ libretro-common/file/config_file.c \ file_path_str.c \ verbosity.c diff --git a/Makefile.psp1 b/Makefile.psp1 index a99c89e754..cf57142100 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -1,8 +1,10 @@ -BUILD_PRX = 1 +BUILD_PRX = 0 +PSP_LARGE_MEMORY = 1 DEBUG = 0 HAVE_KERNEL_PRX = 1 +HAVE_LOGGER = 0 HAVE_FILE_LOGGER = 0 -HAVE_THREADS = 0 +HAVE_THREADS = 1 BIG_STACK = 0 WHOLE_ARCHIVE_LINK = 0 @@ -11,7 +13,7 @@ TARGET = retroarchpsp ifeq ($(DEBUG), 1) OPTIMIZE_LV := -O0 -g else - OPTIMIZE_LV := -O3 -g + OPTIMIZE_LV := -O2 endif ifeq ($(WHOLE_ARCHIVE_LINK), 1) @@ -19,11 +21,11 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1) WHOLE_END := -Wl,--no-whole-archive endif -INCDIR = deps deps/stb deps/libz deps/7zip libretro-common/include +INCDIR = deps deps/stb deps/libz deps/7zip deps/pthreads deps/pthreads/platform/psp deps/pthreads/platform/helper libretro-common/include CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math ASFLAGS = $(CFLAGS) -RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER +RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER LIBDIR = LDFLAGS = diff --git a/Makefile.psp1.salamander b/Makefile.psp1.salamander index 68e0732582..7bcc29a0e8 100644 --- a/Makefile.psp1.salamander +++ b/Makefile.psp1.salamander @@ -1,4 +1,5 @@ -BUILD_PRX = 1 +BUILD_PRX = 0 +PSP_LARGE_MEMORY = 1 HAVE_FILE_LOGGER = 0 DEBUG = 0 @@ -7,7 +8,7 @@ TARGET = retroarchpsp_salamander ifeq ($(DEBUG), 1) OPTIMIZE_LV := -O0 -g else - OPTIMIZE_LV := -O2 -g + OPTIMIZE_LV := -O2 endif INCDIR = $(PSPPATH)/include libretro-common/include @@ -24,7 +25,7 @@ ifeq ($(HAVE_FILE_LOGGER), 1) CFLAGS += -DHAVE_FILE_LOGGER endif -CFLAGS += $(RARCH_DEFINES) +CFLAGS += $(RARCH_DEFINES) EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = RetroArch @@ -45,6 +46,7 @@ OBJS = frontend/frontend_salamander.o \ libretro-common/compat/compat_strcasestr.o \ libretro-common/file/config_file.o \ libretro-common/streams/file_stream.o \ + libretro-common/vfs/vfs_implementation.o \ libretro-common/hash/rhash.o \ file_path_str.o \ verbosity.o \ diff --git a/Makefile.switch b/Makefile.switch new file mode 100644 index 0000000000..a477749409 --- /dev/null +++ b/Makefile.switch @@ -0,0 +1,68 @@ +TARGET := retroarch_switch + +DEBUG ?= 0 +GRIFFIN_BUILD = 0 +WHOLE_ARCHIVE_LINK = 0 + +OBJ := + +DEFINES := -DSWITCH=1 -U__linux__ -U__linux + +ifeq ($(GRIFFIN_BUILD), 1) + OBJ += griffin/griffin.o + DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER + DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB +else + HAVE_CC_RESAMPLER = 1 + HAVE_MENU_COMMON = 1 + HAVE_RTGA = 1 + HAVE_RPNG = 1 + HAVE_RJPEG = 1 + HAVE_RBMP = 1 + HAVE_RGUI = 1 + HAVE_ZLIB = 1 + HAVE_BUILTINZLIB = 1 + HAVE_LIBRETRODB = 1 + HAVE_ZARCH = 0 + HAVE_MATERIALUI = 0 # enable later? + HAVE_XMB = 0 + HAVE_STATIC_VIDEO_FILTERS = 1 + HAVE_STATIC_AUDIO_FILTERS = 1 + HAVE_MENU = 1 + + include Makefile.common + BLACKLIST := + BLACKLIST += input/input_overlay.o + BLACKLIST += tasks/task_overlay.o + OBJ := $(filter-out $(BLACKLIST),$(OBJ)) +endif + + +ifeq ($(strip $(LIBTRANSISTOR_HOME)),) +$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=o libtransistor") +endif + +include $(LIBTRANSISTOR_HOME)/libtransistor.mk + +INCDIRS := -I. -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBTRANSISTOR_HOME)/build/sdl2_install/include/SDL2/ +LIBDIRS := -L. + +TARGETS := $(TARGET).nro + +CFLAGS += $(INCDIRS) $(DEFINES) -Wunused-command-line-argument + +all: $(TARGETS) + +$(TARGET).nro.so: $(OBJ) libretro_switch.a fs.squashfs.o $(LIBTRANSISTOR_NRO_LIB) $(LIBTRANSISTOR_COMMON_LIBS) + $(LD) $(LD_FLAGS) --allow-multiple-definition -o $@ $(OBJ) libretro_switch.a fs.squashfs.o $(LIBTRANSISTOR_NRO_LDFLAGS) -lm + +%.squashfs.o: %.squashfs + $(LD) -s -r -b binary -m aarch64elf -T $(LIBTRANSISTOR_HOME)/fs.T -o $@ $< + +fs.squashfs: fs/* + mksquashfs $^ $@ -comp lz4 -nopad -noappend + +clean: + rm -f $(OBJ) $(TARGET).nro.so $(TARGET).nro + +.PHONY: clean all diff --git a/Makefile.vita b/Makefile.vita index 3138442913..25d79a673e 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -47,6 +47,8 @@ else HAVE_CC_RESAMPLER := 1 HAVE_CHEEVOS := 1 RARCH_CONSOLE := 1 + HAVE_STATIC_VIDEO_FILTERS = 1 + HAVE_STATIC_AUDIO_FILTERS = 1 ifeq ($(DEBUG), 1) HAVE_NETLOGGER = 1 @@ -60,24 +62,6 @@ else OBJ += input/drivers_joypad/psp_joypad.o OBJ += audio/drivers/psp_audio.o OBJ += frontend/drivers/platform_psp.o - OBJ += gfx/video_filters/2xsai.o - OBJ += gfx/video_filters/super2xsai.o - OBJ += gfx/video_filters/supereagle.o - OBJ += gfx/video_filters/2xbr.o - OBJ += gfx/video_filters/darken.o - OBJ += gfx/video_filters/epx.o - OBJ += gfx/video_filters/scale2x.o - OBJ += gfx/video_filters/blargg_ntsc_snes.o - OBJ += gfx/video_filters/lq2x.o - OBJ += gfx/video_filters/phosphor2x.o - OBJ += libretro-common/audio/dsp_filters/echo.o - OBJ += libretro-common/audio/dsp_filters/eq.o - OBJ += libretro-common/audio/dsp_filters/chorus.o - OBJ += libretro-common/audio/dsp_filters/iir.o - OBJ += libretro-common/audio/dsp_filters/panning.o - OBJ += libretro-common/audio/dsp_filters/phaser.o - OBJ += libretro-common/audio/dsp_filters/reverb.o - OBJ += libretro-common/audio/dsp_filters/wahwah.o endif diff --git a/Makefile.vita.salamander b/Makefile.vita.salamander index 3af34fb28e..a443c2c0f7 100644 --- a/Makefile.vita.salamander +++ b/Makefile.vita.salamander @@ -46,6 +46,7 @@ OBJS = frontend/frontend_salamander.o \ libretro-common/compat/compat_strcasestr.o \ libretro-common/file/config_file.o \ libretro-common/streams/file_stream.o \ + libretro-common/vfs/vfs_implementation.o \ libretro-common/hash/rhash.o \ file_path_str.o \ verbosity.o diff --git a/Makefile.wii.salamander b/Makefile.wii.salamander index a125d3f9ed..e39c30bdc8 100644 --- a/Makefile.wii.salamander +++ b/Makefile.wii.salamander @@ -61,6 +61,7 @@ OBJ = frontend/frontend_salamander.o \ libretro-common/lists/string_list.o \ libretro-common/lists/dir_list.o \ libretro-common/streams/file_stream.o \ + libretro-common/vfs/vfs_implementation.o \ libretro-common/file/retro_dirent.o \ libretro-common/encodings/encoding_utf.o \ libretro-common/compat/compat_strl.o \ diff --git a/Makefile.wiiu b/Makefile.wiiu index 00881ed117..789b6c9fcc 100644 --- a/Makefile.wiiu +++ b/Makefile.wiiu @@ -1,112 +1,149 @@ TARGET := retroarch_wiiu -BUILD_HBL_ELF = 1 -BUILD_RPX = 1 -DEBUG = 0 -GRIFFIN_BUILD = 0 -WHOLE_ARCHIVE_LINK = 0 + +BUILD_HBL_ELF = 1 +BUILD_RPX = 1 +DEBUG = 0 +GRIFFIN_BUILD = 0 +SALAMANDER_BUILD = 0 +WHOLE_ARCHIVE_LINK = 0 +HAVE_HID = 0 +WIIU_HID = 0 +BUILD_DIR = objs/wiiu +PC_DEVELOPMENT_IP_ADDRESS ?= +PC_DEVELOPMENT_TCP_PORT ?= + +ifeq ($(SALAMANDER_BUILD),1) + BUILD_DIR := $(BUILD_DIR)-salamander + TARGET := $(TARGET)_salamander +endif + +ifeq ($(DEBUG),1) + BUILD_DIR := $(BUILD_DIR)-debug +endif ifneq ($(V), 1) Q := @ endif -PC_DEVELOPMENT_IP_ADDRESS ?= -PC_DEVELOPMENT_TCP_PORT ?= - OBJ := +OBJ += wiiu/input/wpad_driver.o +OBJ += wiiu/input/kpad_driver.o +OBJ += wiiu/input/pad_functions.o OBJ += wiiu/system/memory.o OBJ += wiiu/system/exception_handler.o -OBJ += wiiu/system/missing_libc_functions.o OBJ += wiiu/fs/sd_fat_devoptab.o OBJ += wiiu/fs/fs_utils.o -OBJ += wiiu/tex_shader.o OBJ += wiiu/hbl.o -ifeq ($(ENABLE_CONTROLLER_PATCHER), 1) - OBJ += wiiu/controller_patcher/ControllerPatcher.o - OBJ += wiiu/controller_patcher/ControllerPatcherWrapper.o - OBJ += wiiu/controller_patcher/ConfigReader.o - OBJ += wiiu/controller_patcher/config/ConfigParser.o - OBJ += wiiu/controller_patcher/config/ConfigValues.o - OBJ += wiiu/controller_patcher/network/ControllerPatcherNet.o - OBJ += wiiu/controller_patcher/network/TCPServer.o - OBJ += wiiu/controller_patcher/network/UDPClient.o - OBJ += wiiu/controller_patcher/network/UDPServer.o - OBJ += wiiu/controller_patcher/patcher/ControllerPatcherUtils.o - OBJ += wiiu/controller_patcher/patcher/ControllerPatcherHID.o - OBJ += wiiu/controller_patcher/utils/CPRetainVars.o - OBJ += wiiu/controller_patcher/utils/CPStringTools.o - OBJ += wiiu/controller_patcher/utils/PadConst.o - OBJ += wiiu/controller_patcher/utils/FSHelper.o -endif - DEFINES := -ifeq ($(GRIFFIN_BUILD), 1) - OBJ += griffin/griffin.o - DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB - DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER - DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -# DEFINES += -DWANT_IFADDRS -# DEFINES += -DHAVE_FREETYPE - DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI -else - HAVE_MENU_COMMON = 1 - HAVE_RTGA = 1 - HAVE_RPNG = 1 - HAVE_RJPEG = 1 - HAVE_RBMP = 1 - HAVE_RGUI = 1 - HAVE_ZLIB = 1 - HAVE_7ZIP = 1 - HAVE_BUILTINZLIB = 1 - HAVE_KEYMAPPER = 1 - HAVE_LIBRETRODB = 1 - HAVE_ZARCH = 0 - HAVE_MATERIALUI = 1 - HAVE_XMB = 1 - HAVE_STB_FONT = 1 -# HAVE_FREETYPE = 1 - HAVE_LANGEXTRA = 1 - HAVE_LIBRETRODB = 1 - HAVE_NETWORKING = 1 - HAVE_CHEEVOS = 1 -# WANT_IFADDRS = 1 - - include Makefile.common - BLACKLIST := - BLACKLIST += input/input_overlay.o - BLACKLIST += tasks/task_overlay.o - BLACKLIST += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o - OBJ := $(filter-out $(BLACKLIST),$(OBJ)) - - OBJ += gfx/drivers/wiiu_gfx.o - OBJ += gfx/drivers_font/wiiu_font.o - OBJ += menu/drivers_display/menu_display_wiiu.o - OBJ += input/drivers/wiiu_input.o - OBJ += input/drivers_joypad/wiiu_joypad.o - OBJ += audio/drivers/wiiu_audio.o - OBJ += frontend/drivers/platform_wiiu.o - OBJ += gfx/video_filters/2xsai.o - OBJ += gfx/video_filters/super2xsai.o - OBJ += gfx/video_filters/supereagle.o - OBJ += gfx/video_filters/2xbr.o - OBJ += gfx/video_filters/darken.o - OBJ += gfx/video_filters/epx.o - OBJ += gfx/video_filters/scale2x.o - OBJ += gfx/video_filters/blargg_ntsc_snes.o - OBJ += gfx/video_filters/lq2x.o - OBJ += gfx/video_filters/phosphor2x.o - OBJ += libretro-common/audio/dsp_filters/echo.o - OBJ += libretro-common/audio/dsp_filters/eq.o - OBJ += libretro-common/audio/dsp_filters/chorus.o - OBJ += libretro-common/audio/dsp_filters/iir.o - OBJ += libretro-common/audio/dsp_filters/panning.o - OBJ += libretro-common/audio/dsp_filters/phaser.o - OBJ += libretro-common/audio/dsp_filters/reverb.o - OBJ += libretro-common/audio/dsp_filters/wahwah.o +ifeq ($(WIIU_HID),1) + DEFINES += -DWIIU_HID + OBJ += wiiu/input/hidpad_driver.o + OBJ += wiiu/input/wiiu_hid.o endif -DEFINES += -DHAVE_KEYMAPPER +ifeq ($(SALAMANDER_BUILD),1) + DEFINES += -DRARCH_CONSOLE -DIS_SALAMANDER + + OBJ += frontend/frontend_salamander.o + OBJ += frontend/frontend_driver.o + OBJ += frontend/drivers/platform_wiiu.o + OBJ += frontend/drivers/platform_null.o + OBJ += libretro-common/encodings/encoding_utf.o + OBJ += libretro-common/compat/compat_strcasestr.o + OBJ += libretro-common/file/file_path.o + OBJ += libretro-common/string/stdstring.o + OBJ += libretro-common/lists/string_list.o + OBJ += libretro-common/lists/dir_list.o + OBJ += libretro-common/file/retro_dirent.o + OBJ += libretro-common/compat/compat_strl.o + OBJ += libretro-common/file/config_file.o + OBJ += libretro-common/streams/file_stream.o + OBJ += libretro-common/vfs/vfs_implementation.o + OBJ += libretro-common/hash/rhash.o + OBJ += file_path_str.o + OBJ += verbosity.o +else + DEFINES += -DRARCH_INTERNAL + DEFINES += -DHAVE_KEYMAPPER + DEFINES += -DHAVE_UPDATE_ASSETS + DEFINES += -DHAVE_FILTERS_BUILTIN + DEFINES += -DHAVE_SLANG + + OBJ += wiiu/system/missing_libc_functions.o + OBJ += wiiu/shader_utils.o + OBJ += wiiu/tex_shader.o + OBJ += wiiu/sprite_shader.o + OBJ += wiiu/frame_shader.o + OBJ += gfx/drivers_shader/slang_preprocess.o + OBJ += gfx/drivers_shader/glslang_util.o + + ifeq ($(GRIFFIN_BUILD), 1) + OBJ += griffin/griffin.o + DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB + DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER + DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING + # DEFINES += -DWANT_IFADDRS + # DEFINES += -DHAVE_FREETYPE + DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI + else + HAVE_MENU_COMMON = 1 + HAVE_RTGA = 1 + HAVE_RPNG = 1 + HAVE_RJPEG = 1 + HAVE_RBMP = 1 + HAVE_RGUI = 1 + HAVE_ZLIB = 1 + HAVE_7ZIP = 1 + HAVE_BUILTINZLIB = 1 + HAVE_KEYMAPPER = 1 + HAVE_LIBRETRODB = 1 + HAVE_ZARCH = 0 + HAVE_MATERIALUI = 1 + HAVE_XMB = 1 + HAVE_STB_FONT = 1 + # HAVE_FREETYPE = 1 + HAVE_LANGEXTRA = 1 + HAVE_LIBRETRODB = 1 + HAVE_NETWORKING = 1 + HAVE_CHEEVOS = 1 + # WANT_IFADDRS = 1 + HAVE_OVERLAY = 1 + HAVE_STATIC_VIDEO_FILTERS = 1 + HAVE_STATIC_AUDIO_FILTERS = 1 + WANT_LIBFAT = 1 + WANT_IOSUHAX = 1 + + include Makefile.common + BLACKLIST := $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o + OBJ := $(filter-out $(BLACKLIST),$(OBJ)) + + OBJ += gfx/drivers/wiiu_gfx.o + OBJ += gfx/drivers_font/wiiu_font.o + OBJ += menu/drivers_display/menu_display_wiiu.o + OBJ += input/drivers/wiiu_input.o + OBJ += input/drivers_joypad/wiiu_joypad.o + OBJ += audio/drivers/wiiu_audio.o + OBJ += frontend/drivers/platform_wiiu.o + endif +endif + +OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ)) + +#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__). +DEFINES += -DWIIU -DMSB_FIRST -D__WUT__ +#DEFINES += -D_GNU_SOURCE +DEFINES += -DHAVE_MAIN +DEFINES += -DRARCH_CONSOLE + +ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),) + DEFINES += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"' +endif + +ifneq ($(PC_DEVELOPMENT_TCP_PORT),) + DEFINES += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT) +endif ifeq ($(strip $(DEVKITPPC)),) $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") @@ -136,7 +173,6 @@ else ELF2RPL := $(ELF2RPL).exe endif - INCDIRS := -I. -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib @@ -148,6 +184,7 @@ ifeq ($(DEBUG), 1) else CFLAGS += -O3 endif + LDFLAGS := $(CFLAGS) ASFLAGS := $(CFLAGS) -mregnames @@ -156,37 +193,28 @@ CFLAGS += -ffast-math -Werror=implicit-function-declaration #CFLAGS += -fomit-frame-pointer -mword-relocations #CFLAGS += -Wall -#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__). -CFLAGS += -DWIIU -DMSB_FIRST -CFLAGS += -DHAVE_MAIN -CFLAGS += -DHAVE_UPDATE_ASSETS -CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -ifeq ($(ENABLE_CONTROLLER_PATCHER), 1) - CFLAGS += -DENABLE_CONTROLLER_PATCHER -endif -CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES) - -ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),) - CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"' -endif - -ifneq ($(PC_DEVELOPMENT_TCP_PORT),) - CFLAGS += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT) -endif - ifeq ($(WHOLE_ARCHIVE_LINK), 1) WHOLE_START := -Wl,--whole-archive WHOLE_END := -Wl,--no-whole-archive endif -CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -D_GNU_SOURCE + +CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions LDFLAGS += -Wl,--gc-sections -LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm -lfat -liosuhax +LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm + +ifneq ($(WANT_LIBFAT), 1) +LIBS += -lfat +endif + +ifneq ($(WANT_IOSUHAX), 1) +LIBS += -liosuhax +endif -RPX_OBJ = wiiu/system/stubs_rpl.o -HBL_ELF_OBJ = wiiu/system/dynamic.o wiiu/system/stubs_elf.o +RPX_OBJ = $(BUILD_DIR)/wiiu/system/stubs_rpl.o +HBL_ELF_OBJ = $(BUILD_DIR)/wiiu/system/dynamic.o $(BUILD_DIR)/wiiu/system/stubs_elf.o RPX_LDFLAGS := -pie -fPIE RPX_LDFLAGS += -z common-page-size=64 -z max-page-size=64 @@ -204,64 +232,67 @@ ifeq ($(BUILD_HBL_ELF), 1) TARGETS += $(TARGET).elf endif -DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend -POSTCOMPILE = mv -f $*.Tdepend $*.depend +DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.depend all: $(TARGETS) -%.o: %.cpp -%.o: %.cpp %.depend +%: $(BUILD_DIR)/% + cp $< $@ + + +$(BUILD_DIR)/%.o: %.cpp %.depend @$(if $(Q), echo CXX $<,) - $(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS) - $(Q)$(POSTCOMPILE) + @mkdir -p $(dir $@) + $(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS) -%.o: %.c -%.o: %.c %.depend +$(BUILD_DIR)/%.o: %.c %.depend @$(if $(Q), echo CC $<,) - $(Q)$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS) - $(Q)$(POSTCOMPILE) + @mkdir -p $(dir $@) + $(Q)$(CC) -c -o $@ $< $(CFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS) - -%.o: %.S -%.o: %.S %.depend +$(BUILD_DIR)/%.o: %.S %.depend @$(if $(Q), echo AS $<,) - $(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) - $(Q)$(POSTCOMPILE) + @mkdir -p $(dir $@) + $(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS) -%.o: %.s -%.o: %.s %.depend +$(BUILD_DIR)/%.o: %.s %.depend @$(if $(Q), echo AS $<,) + @mkdir -p $(dir $@) $(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) - $(Q)$(POSTCOMPILE) %.a: @$(if $(Q), echo AR $<,) + @mkdir -p $(dir $@) $(Q)$(AR) -rc $@ $^ %.depend: ; - +%.last: ; $(ELF2RPL): @$(if $(Q), echo MAKE $@,) $(Q)$(MAKE) -C wiiu/wut/elf2rpl/ -$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld +$(BUILD_DIR)/$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld .$(TARGET).elf.last @$(if $(Q), echo LD $@,) + @touch .$(TARGET).elf.last $(Q)$(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ -$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld +$(BUILD_DIR)/$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld @$(if $(Q), echo LD $@,) $(Q)$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ -$(TARGET).rpx: $(TARGET).rpx.elf $(ELF2RPL) +$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.last @$(if $(Q), echo ELF2RPL $@,) - $(Q)-$(ELF2RPL) $(TARGET).rpx.elf $@ + @touch .$(TARGET).rpx.last + $(Q)-$(ELF2RPL) $< $@ clean: rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx + rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).rpx + rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.last rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend) .PHONY: clean all -.PRECIOUS: %.depend +.PRECIOUS: %.depend %.last -include $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend) diff --git a/Makefile.wiiu.salamander b/Makefile.wiiu.salamander deleted file mode 100644 index 221d8193d1..0000000000 --- a/Makefile.wiiu.salamander +++ /dev/null @@ -1,176 +0,0 @@ -TARGET := retroarch_wiiu_salamander -BUILD_HBL_ELF = 1 -BUILD_RPX = 1 -DEBUG = 0 - -PC_DEVELOPMENT_IP_ADDRESS = -PC_DEVELOPMENT_TCP_PORT = - -OBJ := -OBJ += wiiu/system/memory.o -OBJ += wiiu/system/exception_handler.o -OBJ += wiiu/fs/sd_fat_devoptab.o -OBJ += wiiu/fs/fs_utils.o -OBJ += wiiu/hbl.o -OBJ += frontend/frontend_salamander.o -OBJ += frontend/frontend_driver.o -OBJ += frontend/drivers/platform_wiiu.o -OBJ += frontend/drivers/platform_null.o -OBJ += libretro-common/encodings/encoding_utf.o -OBJ += libretro-common/compat/compat_strcasestr.o -OBJ += libretro-common/file/file_path.o -OBJ += libretro-common/string/stdstring.o -OBJ += libretro-common/lists/string_list.o -OBJ += libretro-common/lists/dir_list.o -OBJ += libretro-common/file/retro_dirent.o -OBJ += libretro-common/compat/compat_strl.o -OBJ += libretro-common/file/config_file.o -OBJ += libretro-common/streams/file_stream.o -OBJ += libretro-common/hash/rhash.o -OBJ += file_path_str.o -OBJ += verbosity.o - -ifeq ($(strip $(DEVKITPPC)),) -$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") -endif -ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=devkitPRO") -endif - -export PATH := $(PATH):$(DEVKITPPC)/bin - -PREFIX := powerpc-eabi- - -CC := $(PREFIX)gcc -CXX := $(PREFIX)g++ -AS := $(PREFIX)as -AR := $(PREFIX)ar -OBJCOPY := $(PREFIX)objcopy -STRIP := $(PREFIX)strip -NM := $(PREFIX)nm -LD := $(CXX) - -ELF2RPL := wiiu/wut/elf2rpl/elf2rpl - -ifneq ($(findstring Linux,$(shell uname -a)),) -else ifneq ($(findstring Darwin,$(shell uname -a)),) -else - ELF2RPL := $(ELF2RPL).exe -endif - - -INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include -LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib - -CFLAGS := -mwup -mcpu=750 -meabi -mhard-float -LDFLAGS := - -ifeq ($(DEBUG), 1) - CFLAGS += -O0 -g -else - CFLAGS += -O3 -endif -LDFLAGS := $(CFLAGS) - -ASFLAGS := $(CFLAGS) -mregnames - -CFLAGS += -ffast-math -Werror=implicit-function-declaration -#CFLAGS += -fomit-frame-pointer -mword-relocations -#CFLAGS += -Wall - -#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__). -CFLAGS += -DWIIU -DMSB_FIRST -CFLAGS += -DHAVE_MAIN -CFLAGS += -DRARCH_CONSOLE -DIS_SALAMANDER - -ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),) - CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"' -endif - -ifneq ($(PC_DEVELOPMENT_TCP_PORT),) - CFLAGS += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT) -endif - -ifeq ($(WHOLE_ARCHIVE_LINK), 1) - WHOLE_START := -Wl,--whole-archive - WHOLE_END := -Wl,--no-whole-archive -endif -CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions - -LDFLAGS += -Wl,--gc-sections - -LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm -lfat -liosuhax - - -RPX_OBJ = wiiu/system/stubs_rpl.o -HBL_ELF_OBJ = wiiu/system/dynamic.o wiiu/system/stubs_elf.o - -RPX_LDFLAGS := -pie -fPIE -RPX_LDFLAGS += -z common-page-size=64 -z max-page-size=64 -RPX_LDFLAGS += -T wiiu/link_rpl.ld -RPX_LDFLAGS += -nostartfiles - -HBL_ELF_LDFLAGS := -T wiiu/link_elf.ld - -TARGETS := -ifeq ($(BUILD_RPX), 1) -TARGETS += $(TARGET).rpx -endif - -ifeq ($(BUILD_HBL_ELF), 1) -TARGETS += $(TARGET).elf -endif - -DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend -POSTCOMPILE = mv -f $*.Tdepend $*.depend - - -all: $(TARGETS) - -%.o: %.cpp -%.o: %.cpp %.depend - $(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS) - $(POSTCOMPILE) - -%.o: %.c -%.o: %.c %.depend - $(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS) - $(POSTCOMPILE) - - -%.o: %.S -%.o: %.S %.depend - $(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) - $(POSTCOMPILE) - -%.o: %.s -%.o: %.s %.depend - $(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) - $(POSTCOMPILE) -%.a: - $(AR) -rc $@ $^ - -%.depend: ; - - -$(ELF2RPL): - $(MAKE) -C wiiu/wut/elf2rpl/ - -$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld - $(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ - -$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld - $(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ - -$(TARGET).rpx: $(TARGET).rpx.elf $(ELF2RPL) - -$(ELF2RPL) $(TARGET).rpx.elf $@ - -clean: - rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx - rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend) - -.PHONY: clean all -.PRECIOUS: %.depend - --include $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend) - diff --git a/README.md b/README.md index c1f633fbd2..09e5262090 100644 --- a/README.md +++ b/README.md @@ -63,18 +63,24 @@ RetroArch also emphasizes on being easy to integrate into various launcher front RetroArch has been ported to the following platforms: + - DOS - Windows - Linux + - Emscripten - FreeBSD - NetBSD - - MacOS + - OpenBSD + - Haiku + - MacOS X - PlayStation 3 - PlayStation Portable - - Original Xbox - - Xbox 360 (Libxenon/XeXDK) - - Wii, GameCube (Libogc) - - WiiU + - PlayStation Vita + - Original Microsoft Xbox + - Microsoft Xbox 360 (Libxenon/XeXDK) + - Nintendo Wii, GameCube (Libogc) + - Nintendo WiiU - Nintendo 3DS + - Nintendo Switch - Raspberry Pi - Android - iOS diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 6acb0b2ca7..d262bbe79c 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis - * + * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -21,7 +21,6 @@ #include #include