Skip to content

Commit

Permalink
Merge branch 'master' into opengl
Browse files Browse the repository at this point in the history
  • Loading branch information
leiradel committed Mar 24, 2018
2 parents b9b95c4 + 1308286 commit 925994d
Show file tree
Hide file tree
Showing 142 changed files with 42,622 additions and 1,115 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
log.txt
Makefile.cross
bin/*
src/dynlib/*.o
Expand Down
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
CC=gcc
CXX=g++
RC=windres
INCLUDES=-Isrc -I../RA_Integration/rapidjson/include
INCLUDES=-Isrc -I../RA_Integration -I../RA_Integration/rapidjson/include
DEFINES=-DOUTSIDE_SPEEX -DRANDOM_PREFIX=speex -DEXPORT= -D_USE_SSE2 -DFIXED_POINT
CCFLAGS=-Wall -m32 $(INCLUDES) $(DEFINES) `sdl2-config --cflags`
CXXFLAGS=$(CCFLAGS) -std=c++11
LDFLAGS=-m32

ifneq ($(DEBUG),)
CFLAGS += -O0 -g -DDEBUG_FSM
CXXFLAGS += -O0 -g -DDEBUG_FSM
CFLAGS += -O0 -g -DDEBUG_FSM -DLOG_TO_FILE
CXXFLAGS += -O0 -g -DDEBUG_FSM -DLOG_TO_FILE
else
CFLAGS += -O3 -DNDEBUG
CXXFLAGS += -O3 -DNDEBUG
CFLAGS += -O3 -DNDEBUG -DLOG_TO_FILE
CXXFLAGS += -O3 -DNDEBUG -DLOG_TO_FILE
endif

# main
Expand All @@ -24,7 +24,7 @@ OBJS=\
src/libretro/BareCore.o \
src/libretro/Core.o \
src/RA_Integration/RA_Implementation.o \
src/RA_Integration/RA_Interface.o \
../RA_Integration/RA_Interface.o \
src/components/Audio.o \
src/components/Config.o \
src/components/Dialog.o \
Expand Down Expand Up @@ -55,14 +55,17 @@ OBJS=\
all: bin/RALibretro

bin/RALibretro: $(OBJS)
mkdir -p bin
$(CXX) $(LDFLAGS) -o $@ $+ $(LIBS)
rm -f bin/RALibretro-*.zip
zip -9 bin/RALibretro-`date +%Y-%m-%d-%H-%M-%S | tr -d "\n"`-`git rev-parse HEAD | tr -d "\n" | cut -c 1-7`.zip bin/RALibretro.exe

src/Git.cpp: etc/Git.cpp.template FORCE
cat $< | sed s/GITFULLHASH/`git rev-parse HEAD | tr -d "\n"`/g | sed s/GITMINIHASH/`git rev-parse HEAD | tr -d "\n" | cut -c 1-7`/g > $@

zip:
rm -f bin/RALibretro-*.zip
zip -9 bin/RALibretro-`date +%Y-%m-%d-%H-%M-%S | tr -d "\n"`-`git rev-parse HEAD | tr -d "\n" | cut -c 1-7`.zip bin/RALibretro.exe

clean:
rm -f bin/RALibretro $(OBJS)
rm -f bin/RALibretro $(OBJS) bin/RALibretro-*.zip

.PHONY: clean FORCE
31 changes: 31 additions & 0 deletions RALibretro.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RALibretro", "src\RALibretro.vcxproj", "{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Debug|x64.ActiveCfg = Debug|x64
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Debug|x64.Build.0 = Debug|x64
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Debug|x86.ActiveCfg = Debug|Win32
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Debug|x86.Build.0 = Debug|Win32
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Release|x64.ActiveCfg = Release|x64
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Release|x64.Build.0 = Release|x64
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Release|x86.ActiveCfg = Release|Win32
{418D11DE-D07C-4BF2-A454-ACCCB451BBE1}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {71DAD649-EAE3-4C0D-B698-FF8A5EE83E01}
EndGlobalSection
EndGlobal
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Building RALibretro with MSYS2

## Install MSYS2

1. Go to [http://www.msys2.org/](http://www.msys2.org/) and download the 32 bit version.
1. Follow the installation instructions on the site [http://www.msys2.org/](http://www.msys2.org/).
1. When on the prompt for the first time, run `pacman -Syu` (**NOTE**: at the end of this command it will ask you to close the terminal window **without** going back to the prompt.)
1. Launch the MSYS2 terminal again and run `pacman -Su`

## Install the toolchain

```
$ pacman -S make git zip mingw-w64-i686-gcc mingw-w64-i686-SDL2 mingw-w64-i686-gcc-libs
```

## Clone the repo

```
$ git clone --recursive --depth 1 https://github.com/leiradel/RASuite.git
```

## Build

```
$ cd /path/to/RASuite/RALibretro
$ make
```

**NOTE**: use `make` for a release build or `make DEBUG=1` for a debug build. Don't forget to run `make clean` first if switching between a release build and a debug build.

# Building RALibretro with Visual Studio

1. Download SDL2-devel-XXXX-VC.xip from https://www.libsdl.org/download-2.0.php
1. Extract to SDL2 subdirectory in the RALibretro folder of your checkout
1. Load `RALibretro.sln` in Visual Studio
16 changes: 16 additions & 0 deletions SDL2/BUGS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Bugs are now managed in the SDL bug tracker, here:

https://bugzilla.libsdl.org/

You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.


You may also find help at the SDL forums/mailing list:

https://discourse.libsdl.org/

Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
bugs discussed on the mailing list may be forgotten or missed.

20 changes: 20 additions & 0 deletions SDL2/COPYING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

13 changes: 13 additions & 0 deletions SDL2/README-SDL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Please distribute this file with the SDL runtime environment:

The Simple DirectMedia Layer (SDL for short) is a cross-platform library
designed to make it easy to write multi-media software, such as games
and emulators.

The Simple DirectMedia Layer library source code is available from:
https://www.libsdl.org/

This library is distributed under the terms of the zlib license:
http://www.zlib.net/zlib_license.html

21 changes: 21 additions & 0 deletions SDL2/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Simple DirectMedia Layer

(SDL)

Version 2.0

---
https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
Sam Lantinga (slouken@libsdl.org)
Loading

0 comments on commit 925994d

Please sign in to comment.