Skip to content

Commit

Permalink
Merge branch 'master' into qt
Browse files Browse the repository at this point in the history
  • Loading branch information
fr500 authored Dec 11, 2016
2 parents fd84613 + d82349a commit f9c3869
Show file tree
Hide file tree
Showing 284 changed files with 21,266 additions and 14,826 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "deps/glslang/glslang"]
path = deps/glslang/glslang
url = https://github.com/KhronosGroup/glslang.git
url = https://github.com/libretro/glslang.git
[submodule "deps/SPIRV-Cross"]
path = deps/SPIRV-Cross
url = https://github.com/KhronosGroup/SPIRV-Cross
35 changes: 29 additions & 6 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ OBJ += frontend/frontend.o \
$(LIBRETRO_COMM_DIR)/queues/message_queue.o \
managers/state_manager.o \
gfx/drivers_font_renderer/bitmapfont.o \
input/input_autodetect.o \
tasks/task_autodetect.o \
input/input_autodetect_builtin.o \
input/input_joypad_driver.o \
input/input_config.o \
Expand Down Expand Up @@ -636,6 +636,7 @@ ifeq ($(HAVE_UDEV), 1)
DEFINES += $(UDEV_CFLAGS)
LIBS += $(UDEV_LIBS)
OBJ += input/drivers/udev_input.o \
input/common/udev_common.o \
input/drivers_keyboard/keyboard_event_udev.o \
input/drivers_joypad/udev_joypad.o
endif
Expand Down Expand Up @@ -710,6 +711,16 @@ ifeq ($(HAVE_KMS), 1)
LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS)
endif

ifeq ($(HAVE_CACA), 1)
DEFINES += -DHAVE_CACA
OBJ += gfx/drivers/caca_gfx.o gfx/drivers_font/caca_font.o
LIBS += -lcaca

ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_caca.o
endif
endif

ifeq ($(HAVE_PLAIN_DRM), 1)
OBJ += gfx/drivers/drm_gfx.o
CFLAGS += -I/usr/include/libdrm
Expand Down Expand Up @@ -857,7 +868,8 @@ ifeq ($(HAVE_VULKAN), 1)
$(wildcard $(DEPS_DIR)/glslang/glslang/hlsl/*.cpp) \
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp)

SPIRV_CROSS_SOURCES := $(DEPS_DIR)/SPIRV-Cross/spirv_cross.cpp
SPIRV_CROSS_SOURCES := $(DEPS_DIR)/SPIRV-Cross/spirv_cross.cpp \
$(DEPS_DIR)/SPIRV-Cross/spirv_cfg.cpp
ifneq ($(findstring Win32,$(OS)),)
# Trivial temporary workaround for MinGW and glslang.
CXXFLAGS += -fpermissive
Expand All @@ -876,7 +888,7 @@ ifeq ($(HAVE_VULKAN), 1)
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses -Igfx/include
CFLAGS += -Igfx/include

GLSLANG_OBJ := $(GLSLANG_SOURCES:.cpp=.o)
GLSLANG_OBJ := $(GLSLANG_SOURCES:.cpp=.o)
SPIRV_CROSS_OBJ := $(SPIRV_CROSS_SOURCES:.cpp=.o)

OBJ += gfx/drivers/vulkan.o \
Expand Down Expand Up @@ -975,7 +987,9 @@ endif

# Compression/Archive

OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \
$(LIBRETRO_COMM_DIR)/streams/trans_stream.o \
$(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.o

ifeq ($(HAVE_7ZIP),1)
CFLAGS += -I$(DEPS_DIR)/7zip
Expand All @@ -1001,7 +1015,8 @@ endif


ifeq ($(HAVE_ZLIB), 1)
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_zlib.o
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
Expand Down Expand Up @@ -1081,8 +1096,11 @@ ifeq ($(HAVE_NETWORKING), 1)
OBJ += $(LIBRETRO_COMM_DIR)/net/net_compat.o \
$(LIBRETRO_COMM_DIR)/net/net_http.o \
$(LIBRETRO_COMM_DIR)/net/net_socket.o \
$(LIBRETRO_COMM_DIR)/net/net_natt.o \
network/net_http_special.o \
tasks/task_http.o
tasks/task_http.o \
tasks/task_netplay_lan_scan.o \
tasks/task_wifi.o

ifneq ($(HAVE_SOCKET_LEGACY),1)
OBJ += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
Expand All @@ -1102,6 +1120,7 @@ ifeq ($(HAVE_NETWORKING), 1)
OBJ += network/netplay/netplay_net.o \
network/netplay/netplay_spectate.o \
network/netplay/netplay_common.o \
network/netplay/netplay_discovery.o \
network/netplay/netplay.o

# Retro Achievements (also depends on threads)
Expand All @@ -1118,6 +1137,10 @@ ifeq ($(HAVE_NETWORKING), 1)
OBJ += input/input_remote.o \
cores/libretro-net-retropad/net_retropad_core.o
endif

ifeq ($(HAVE_MINIUPNPC), 1)
LIBS += -lminiupnpc
endif
endif

ifneq ($(findstring Win32,$(OS)),)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.ctr
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>dev
endif

ifeq ($(strip $(CTRULIB)),)
CTRULIB = $(DEVKITPRO)/ctrulib
CTRULIB = $(DEVKITPRO)/libctru
endif

APP_TITLE := $(shell echo "$(APP_TITLE)" | cut -c1-128)
Expand Down
95 changes: 57 additions & 38 deletions Makefile.wiiu
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
TARGET := retroarch_wiiu
RPX_BUILD = 0
BUILD_HBL_ELF = 1
BUILD_RPX = 1
DEBUG = 0
GRIFFIN_BUILD = 0
WHOLE_ARCHIVE_LINK = 0
Expand All @@ -14,11 +15,6 @@ OBJ += wiiu/fs/sd_fat_devoptab.o
OBJ += wiiu/fs/fs_utils.o
OBJ += wiiu/tex_shader.o

ifneq ($(RPX_BUILD), 1)
OBJ += wiiu/system/dynamic.o
OBJ += wiiu/system/dyn_stubs.o
endif

DEFINES :=

ifeq ($(GRIFFIN_BUILD), 1)
Expand Down Expand Up @@ -115,15 +111,15 @@ else
endif
LDFLAGS := $(CFLAGS)

ASFLAGS := $(CFLAGS) -mregnames $(INCDIRS)
ASFLAGS := $(CFLAGS) -mregnames

CFLAGS += -ffast-math -Werror=implicit-function-declaration
#CFLAGS += -fomit-frame-pointer -mword-relocations
#CFLAGS += -Wall
CFLAGS += -Dstatic_assert=_Static_assert
CFLAGS += -DWIIU -DMSB_FIRST
CFLAGS += -DHAVE_MAIN
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -DSINC_LOWEST_QUALITY
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)

ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
Expand All @@ -140,54 +136,77 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
endif
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions

ifeq ($(RPX_BUILD), 1)
CFLAGS += -fno-builtin -ffreestanding -DRPX_BUILD
LIBDIRS += -L$(WUT_ROOT)/lib -L$(DEVKITPPC)/lib
LDFLAGS += -pie -fPIE
LDFLAGS += -z common-page-size=64 -z max-page-size=64
LDFLAGS += -lcoreinit -lgx2 -lnsysnet -lproc_ui -lsndcore2 -lsysapp -lvpad
LDFLAGS += -T $(WUT_ROOT)/rules/rpl.ld
# LDFLAGS += -T wiiu/link_rpl.ld
LDFLAGS += -nostartfiles

else
LDFLAGS += -T wiiu/link_elf.ld
endif

LDFLAGS += -Wl,--gc-sections

LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm

ifeq ($(RPX_BUILD), 1)
all: $(TARGET).elf $(TARGET).rpx
else
all: $(TARGET).elf

RPX_OBJ = wiiu/system/stubs_rpl.o
HBL_ELF_OBJ = wiiu/system/dynamic.o wiiu/system/stubs_elf.o

RPX_LDFLAGS := -L$(WUT_ROOT)/lib -L$(DEVKITPPC)/lib
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
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS)
%.o: %.cpp %.depend
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)

%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS)
%.o: %.c %.depend
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)

%.o: %.s
$(CC) -c -o $@ $< $(ASFLAGS)

%.o: %.S
$(CC) -c -o $@ $< $(ASFLAGS)
%.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 $@ $^

$(TARGET).elf: $(OBJ) libretro_wiiu.a wiiu/link_elf.ld wiiu/link_rpl.ld
$(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
%.depend: ;


$(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 $@

%.rpx: %.elf
$(ELF2RPL) $(notdir $<) $@
$(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) $(notdir $<) $@

clean:
rm -f $(OBJ)
rm -f $(TARGET).elf
rm -f $(TARGET).rpx
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)
Loading

0 comments on commit f9c3869

Please sign in to comment.