diff options
| author | Ray <[email protected]> | 2018-06-24 12:44:58 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-06-24 12:44:58 +0200 |
| commit | bd957c7442974d7c9bdab1d01709ee1a73c70c4f (patch) | |
| tree | 529c26f758e789429fb13c506bd4dadb8ae08933 /src | |
| parent | b1d38100110c736b14fa98b0981b0934d6d404e7 (diff) | |
| parent | 59ebe1b7c322232f38c98afa7d5df8fade9bc6f5 (diff) | |
| download | raylib-bd957c7442974d7c9bdab1d01709ee1a73c70c4f.tar.gz raylib-bd957c7442974d7c9bdab1d01709ee1a73c70c4f.zip | |
Merge pull request #557 from Martinfx/max-support-bsd-os
Added support OpenBSD, NetBSD, DragonFly OS
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 25 | ||||
| -rw-r--r-- | src/core.c | 6 | ||||
| -rw-r--r-- | src/raylib.h | 2 | ||||
| -rw-r--r-- | src/rglfw.c | 4 |
4 files changed, 23 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile index c05e74bb..6f71874f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,7 +6,7 @@ # PLATFORM_DESKTOP: Windows (Win32, Win64) # PLATFORM_DESKTOP: Linux (32 and 64 bit) # PLATFORM_DESKTOP: OSX/macOS -# PLATFORM_DESKTOP: FreeBSD +# PLATFORM_DESKTOP: FreeBSD, OpenBSD, NetBSD, DragonFly # PLATFORM_ANDROID: Android (ARM, ARM64) # PLATFORM_RPI: Raspberry Pi (Raspbian) # PLATFORM_WEB: HTML5 (Chrome, Firefox) @@ -111,7 +111,16 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) PLATFORM_OS=LINUX endif ifeq ($(UNAMEOS),FreeBSD) - PLATFORM_OS=FREEBSD + PLATFORM_OS=BSD + endif + ifeq ($(UNAMEOS),OpenBSD) + PLATFORM_OS=BSD + endif + ifeq ($(UNAMEOS),NetBSD) + PLATFORM_OS=BSD + endif + ifeq ($(UNAMEOS),DragonFly) + PLATFORM_OS=BSD endif ifeq ($(UNAMEOS),Darwin) PLATFORM_OS=OSX @@ -185,8 +194,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),OSX) RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/osx endif - ifeq ($(PLATFORM_OS),FREEBSD) - RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/freebsd + ifeq ($(PLATFORM_OS),BSD) + RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/bsd endif endif ifeq ($(PLATFORM),PLATFORM_RPI) @@ -231,8 +240,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) CC = clang GLFW_CFLAGS = -x objective-c endif - ifeq ($(PLATFORM_OS),FREEBSD) - # FreeBSD default compiler + ifeq ($(PLATFORM_OS),BSD) + # FreeBSD, OpenBSD, NetBSD, DragonFly default compiler CC = clang endif endif @@ -346,7 +355,7 @@ endif INCLUDE_PATHS = -I. -Iexternal -Iexternal/glfw/include ifeq ($(PLATFORM),PLATFORM_DESKTOP) - ifeq ($(PLATFORM_OS),FREEBSD) + ifeq ($(PLATFORM_OS),BSD) INCLUDE_PATHS += -I/usr/local/include LDFLAGS += -L. -Lsrc -L/usr/local/lib -L$(RAYLIB_RELEASE_PATH) endif @@ -459,7 +468,7 @@ else cd $(RAYLIB_RELEASE_PATH) && ln -fs libraylib.$(RAYLIB_VERSION).dylib libraylib.$(RAYLIB_API_VERSION).dylib cd $(RAYLIB_RELEASE_PATH) && ln -fs libraylib.$(RAYLIB_VERSION).dylib libraylib.dylib endif - ifeq ($(PLATFORM_OS),FREEBSD) + ifeq ($(PLATFORM_OS),BSD) # WARNING: you should type "gmake clean" before doing this target $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/libraylib.$(RAYLIB_VERSION).so $(OBJS) -Wl,-soname,libraylib.$(RAYLIB_API_VERSION).so -lGL -lpthread @echo "raylib shared library generated (libraylib.$(RAYLIB_VERSION).so)!" @@ -5,7 +5,7 @@ * PLATFORMS SUPPORTED: * - PLATFORM_DESKTOP: Windows (Win32, Win64) * - PLATFORM_DESKTOP: Linux (X11 desktop mode) -* - PLATFORM_DESKTOP: FreeBSD (X11 desktop) +* - PLATFORM_DESKTOP: FreeBSD, OpenBSD, NetBSD, DragonFly (X11 desktop) * - PLATFORM_DESKTOP: OSX/macOS * - PLATFORM_ANDROID: Android 4.0 (ARM, ARM64) * - PLATFORM_RPI: Raspberry Pi 0,1,2,3 (Raspbian) @@ -15,7 +15,7 @@ * CONFIGURATION: * * #define PLATFORM_DESKTOP -* Windowing and input system configured for desktop platforms: Windows, Linux, OSX, FreeBSD +* Windowing and input system configured for desktop platforms: Windows, Linux, OSX, FreeBSD, OpenBSD, NetBSD, DragonFly * NOTE: Oculus Rift CV1 requires PLATFORM_DESKTOP for mirror rendering - View [rlgl] module to enable it * * #define PLATFORM_ANDROID @@ -57,7 +57,7 @@ * Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback() * * DEPENDENCIES: -* rglfw - Manage graphic device, OpenGL context and inputs on PLATFORM_DESKTOP (Windows, Linux, OSX. FreeBSD) +* rglfw - Manage graphic device, OpenGL context and inputs on PLATFORM_DESKTOP (Windows, Linux, OSX. FreeBSD, OpenBSD, NetBSD, DragonFly) * raymath - 3D math functionality (Vector2, Vector3, Matrix, Quaternion) * camera - Multiple 3D camera modes (free, orbital, 1st person, 3rd person) * gestures - Gestures system for touch-ready devices (or simulated from mouse inputs) diff --git a/src/raylib.h b/src/raylib.h index 9a6e117f..5542db71 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -13,7 +13,7 @@ * - Shaders support, including Model shaders and Postprocessing shaders * - Powerful math module for Vector, Matrix and Quaternion operations: [raymath] * - Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD) -* - Multiple platforms support: Windows, Linux, FreeBSD, MacOS, UWP, Android, Raspberry Pi, HTML5. +* - Multiple platforms support: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly, MacOS, UWP, Android, Raspberry Pi, HTML5. * - VR stereo rendering with configurable HMD device parameters * - NO external dependencies, all required libraries included with raylib * - Complete bindings to LUA (raylib-lua) and Go (raylib-go) diff --git a/src/rglfw.c b/src/rglfw.c index e1b5392e..50d606d4 100644 --- a/src/rglfw.c +++ b/src/rglfw.c @@ -37,7 +37,7 @@ #define _GLFW_X11 #endif #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) #define _GLFW_X11 #endif #if defined(__APPLE__) @@ -91,7 +91,7 @@ #include "external/glfw/src/osmesa_context.c" #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) || defined(__DragonFly__) #include "external/glfw/src/x11_init.c" #include "external/glfw/src/x11_monitor.c" #include "external/glfw/src/x11_window.c" |
