From 951918a245abd821bcfd533fc732cd6064420a98 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 7 Dec 2017 05:54:54 +0100 Subject: [PATCH] Reduce size of Makefiles --- Makefile.common | 44 ++++++++++++++++++++++++++++++++++++++++++++ Makefile.ctr | 30 ++---------------------------- Makefile.emscripten | 22 ++-------------------- Makefile.vita | 20 ++------------------ Makefile.wiiu | 20 ++------------------ 5 files changed, 52 insertions(+), 84 deletions(-) diff --git a/Makefile.common b/Makefile.common index 14caf2e2014..07bf65126d6 100644 --- a/Makefile.common +++ b/Makefile.common @@ -127,6 +127,10 @@ 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 @@ -570,12 +574,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 @@ -845,6 +858,13 @@ 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 ($(HAVE_WAYLAND), 1) OBJ += gfx/drivers_context/wayland_ctx.o \ input/drivers/wayland_input.o @@ -1584,3 +1604,27 @@ 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 ($(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 diff --git a/Makefile.ctr b/Makefile.ctr index c277d3df774..79e34c8a8c4 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -61,42 +61,16 @@ else HAVE_ZARCH = 0 HAVE_MATERIALUI = 1 HAVE_XMB = 1 + HAVE_STATIC_VIDEO_FILTERS = 1 + HAVE_STATIC_AUDIO_FILTERS = 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") endif diff --git a/Makefile.emscripten b/Makefile.emscripten index fb3a215339c..e191cfd8747 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.vita b/Makefile.vita index 31384429133..25d79a673eb 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.wiiu b/Makefile.wiiu index 00881ed1178..b3389af1afc 100644 --- a/Makefile.wiiu +++ b/Makefile.wiiu @@ -71,6 +71,8 @@ else HAVE_NETWORKING = 1 HAVE_CHEEVOS = 1 # WANT_IFADDRS = 1 + HAVE_STATIC_VIDEO_FILTERS = 1 + HAVE_STATIC_AUDIO_FILTERS = 1 include Makefile.common BLACKLIST := @@ -86,24 +88,6 @@ else 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 endif DEFINES += -DHAVE_KEYMAPPER