Unverified Commit f811618f authored by Ignacio Sanchez Gines's avatar Ignacio Sanchez Gines
Browse files

Add BSD support

parent 3e49784f
Pipeline #37525 passed with stages
in 12 minutes and 14 seconds
......@@ -8,7 +8,7 @@ on:
jobs:
linux:
name: Linux Build
name: Linux
runs-on: ubuntu-latest
steps:
- name: Checkout
......@@ -23,7 +23,7 @@ jobs:
run: make
working-directory: platforms/linux
libretro:
name: Libretro Build
name: Libretro (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Checkout
......@@ -34,7 +34,7 @@ jobs:
run: make
working-directory: platforms/libretro
ios:
name: iOS Build
name: iOS
runs-on: macOS-latest
steps:
- name: Checkout
......@@ -45,7 +45,7 @@ jobs:
run: xcodebuild clean build -sdk iphonesimulator -project Gearsystem.xcodeproj -scheme Gearsystem CODE_SIGNING_REQUIRED=NO
working-directory: platforms/ios
macos:
name: macOS Build
name: macOS
runs-on: macOS-latest
steps:
- name: Checkout
......@@ -63,7 +63,7 @@ jobs:
name: macOS App bundle
path: platforms/macos/Gearsystem.app
windows:
name: Windows Build
name: Windows
runs-on: windows-latest
steps:
- name: Checkout
......@@ -83,3 +83,20 @@ jobs:
with:
name: Windows binary
path: platforms/windows/release/Gearsystem.exe
bsd:
name: FreeBSD
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: make
id: test
uses: vmactions/freebsd-vm@v0.1.5
with:
usesh: true
prepare: pkg install -y git gmake pkgconf SDL2 glew lang/gcc
run: |
cd platforms/bsd
gmake
\ No newline at end of file
......@@ -2,7 +2,7 @@
[![Gearsystem CI](https://github.com/drhelius/Gearsystem/workflows/Gearsystem%20CI/badge.svg)](https://github.com/drhelius/Gearsystem/actions)
Gearsystem is a very accurate, cross-platform Sega Master System / Game Gear / SG-1000 emulator written in C++ that runs on Windows, macOS, Linux, iOS, Raspberry Pi and RetroArch.
Gearsystem is a very accurate, cross-platform Sega Master System / Game Gear / SG-1000 emulator written in C++ that runs on Windows, macOS, Linux, BSD, iOS, Raspberry Pi and RetroArch.
This is an open source project with its ongoing development made possible thanks to the support by these awesome [backers](backers.md).
......@@ -43,7 +43,7 @@ Please, consider [sponsoring](https://github.com/sponsors/drhelius) and followin
- Save states.
- Compressed rom support (ZIP).
- *Game Genie* and *Pro Action Replay* cheat support.
- Supported platforms (standalone): Windows, Linux, macOS, Raspberry Pi and iOS.
- Supported platforms (standalone): Windows, Linux, BSD, macOS, Raspberry Pi and iOS.
- Supported platforms (libretro): Windows, Linux, macOS, Raspberry Pi, Android, iOS, tvOS, PlayStation Vita, PlayStation 3, Nintendo 3DS, Nintendo GameCube, Nintendo Wii, Nintendo WiiU, Nintendo Switch Emscripten, Classic Mini systemts (NES, SNES, C64 ...) and QNX.
- Full debugger with disassembler, breakpoints, debug symbols, memory editor, IO inspector and VRAM viewer including tiles, sprites, backgrounds and palettes.
- Windows and Linux *Portable Mode* by creating a file named `portable.ini` in the same directory as the application binary.
......@@ -87,6 +87,16 @@ cd platforms/linux
make
```
### BSD
- NetBSD:
``` shell
su root -c "pkgin install gmake pkgconf SDL2 glew"
cd platforms/bsd
gmake
```
### iOS
- Install latest Xcode for macOS.
......
......@@ -6,7 +6,7 @@
#ifndef SOUND_QUEUE_H
#define SOUND_QUEUE_H
#include <SDL2/SDL.h>
#include <SDL.h>
// Simple SDL sound wrapper that has a synchronous interface
class Sound_Queue {
......
include ../desktop-shared/Makefile.common
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -48,25 +48,30 @@ ifeq ($(UNAME_S), Linux) #LINUX
LIBS += -lGL -lGLEW -ldl `sdl2-config --libs`
CXXFLAGS += `sdl2-config --cflags`
CFLAGS = $(CXXFLAGS)
endif
ifeq ($(UNAME_S), Darwin) #APPLE
CFLAGS += $(CXXFLAGS)
else ifeq ($(UNAME_S), Darwin) #APPLE
ECHO_MESSAGE = "macOS"
LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
LIBS += -L/usr/local/lib
CXXFLAGS += `sdl2-config --cflags`
CXXFLAGS += -I/usr/local/include -I/opt/local/include
CFLAGS = $(CXXFLAGS)
endif
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
CFLAGS += $(CXXFLAGS)
else ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
ECHO_MESSAGE = "MinGW"
LIBS += -lgdi32 -lopengl32 -lglew32 -limm32 `pkg-config --static --libs sdl2`
CXXFLAGS += `pkg-config --cflags sdl2`
CFLAGS = $(CXXFLAGS)
CFLAGS += $(CXXFLAGS)
else
ECHO_MESSAGE = "Generic Unix-like/BSD"
LIBS += `sdl2-config --libs` -lSDL2
LIBS += `pkg-config --libs glew` -lGLEW
CXXFLAGS += -std=gnu++11
CXXFLAGS += `sdl2-config --cflags`
CXXFLAGS += `pkg-config --cflags glew`
CFLAGS += $(CXXFLAGS)
endif
##---------------------------------------------------------------------
......@@ -95,7 +100,7 @@ all: $(EXE)
@echo Build complete for $(ECHO_MESSAGE)
$(EXE): $(OBJS)
$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
$(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
clean:
rm -f $(EXE) $(OBJS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment