Skip to content

Commit

Permalink
Reduce size of Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Dec 7, 2017
1 parent 542235f commit 951918a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 84 deletions.
44 changes: 44 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
30 changes: 2 additions & 28 deletions Makefile.ctr
Original file line number Diff line number Diff line change
Expand Up @@ -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=<path to>devkitpro")
endif
Expand Down
22 changes: 2 additions & 20 deletions Makefile.emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
20 changes: 2 additions & 18 deletions Makefile.vita
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down
20 changes: 2 additions & 18 deletions Makefile.wiiu
Original file line number Diff line number Diff line change
Expand Up @@ -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 :=
Expand All @@ -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
Expand Down

0 comments on commit 951918a

Please sign in to comment.