mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-17 20:05:35 +00:00
Merge pull request #114 from cHemingway/osx-fixes
Fix building examples on OSX
This commit is contained in:
@@ -85,6 +85,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# add standard directories for GNU/Linux
|
# add standard directories for GNU/Linux
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
INCLUDES = -I. -I../src -I/usr/local/include/raylib/
|
INCLUDES = -I. -I../src -I/usr/local/include/raylib/
|
||||||
|
else ifeq ($(PLATFORM_OS),OSX)
|
||||||
|
INCLUDES = -I. -I../src
|
||||||
else
|
else
|
||||||
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
|
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
|
||||||
# external libraries headers
|
# external libraries headers
|
||||||
@@ -103,6 +105,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# add standard directories for GNU/Linux
|
# add standard directories for GNU/Linux
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LFLAGS = -L. -L../../src
|
LFLAGS = -L. -L../../src
|
||||||
|
else ifeq ($(PLATFORM_OS),OSX)
|
||||||
|
LFLAGS = -L. -L../src
|
||||||
else
|
else
|
||||||
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
||||||
# external libraries to link with
|
# external libraries to link with
|
||||||
@@ -129,7 +133,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# libraries for OS X 10.9 desktop compiling
|
# libraries for OS X 10.9 desktop compiling
|
||||||
# requires the following packages:
|
# requires the following packages:
|
||||||
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
||||||
LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
|
LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa
|
||||||
else
|
else
|
||||||
# libraries for Windows desktop compiling
|
# libraries for Windows desktop compiling
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
||||||
|
|||||||
@@ -1447,7 +1447,11 @@ static void InitDisplay(int width, int height)
|
|||||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // Choose OpenGL minor version (just hint)
|
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // Choose OpenGL minor version (just hint)
|
||||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // Profiles Hint: Only 3.3 and above!
|
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // Profiles Hint: Only 3.3 and above!
|
||||||
// Other values: GLFW_OPENGL_ANY_PROFILE, GLFW_OPENGL_COMPAT_PROFILE
|
// Other values: GLFW_OPENGL_ANY_PROFILE, GLFW_OPENGL_COMPAT_PROFILE
|
||||||
|
#ifdef __APPLE__
|
||||||
|
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // OSX Requires
|
||||||
|
#else
|
||||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE); // Fordward Compatibility Hint: Only 3.3 and above!
|
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE); // Fordward Compatibility Hint: Only 3.3 and above!
|
||||||
|
#endif
|
||||||
//glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE);
|
//glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LFLAGS = -L. -L../../src
|
LFLAGS = -L. -L../../src
|
||||||
else
|
else
|
||||||
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
LFLAGS = -L. -L../../src
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
LFLAGS += -LC:/raylib/raylib/src
|
||||||
|
endif
|
||||||
# external libraries to link with
|
# external libraries to link with
|
||||||
# GLFW3
|
# GLFW3
|
||||||
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
||||||
@@ -134,7 +137,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# libraries for OS X 10.9 desktop compiling
|
# libraries for OS X 10.9 desktop compiling
|
||||||
# requires the following packages:
|
# requires the following packages:
|
||||||
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
||||||
LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
|
LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa
|
||||||
else
|
else
|
||||||
# libraries for Windows desktop compiling
|
# libraries for Windows desktop compiling
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
||||||
|
|||||||
@@ -109,7 +109,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LFLAGS = -L. -L../../src
|
LFLAGS = -L. -L../../src
|
||||||
else
|
else
|
||||||
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
LFLAGS = -L. -L../../src
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
LFLAGS += -LC:/raylib/raylib/src
|
||||||
|
endif
|
||||||
# external libraries to link with
|
# external libraries to link with
|
||||||
# GLFW3
|
# GLFW3
|
||||||
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LFLAGS = -L. -L../../src
|
LFLAGS = -L. -L../../src
|
||||||
else
|
else
|
||||||
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
LFLAGS = -L. -L../../src
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
LFLAGS += -LC:/raylib/raylib/src
|
||||||
|
endif
|
||||||
# external libraries to link with
|
# external libraries to link with
|
||||||
# GLFW3
|
# GLFW3
|
||||||
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
||||||
@@ -133,7 +136,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# libraries for OS X 10.9 desktop compiling
|
# libraries for OS X 10.9 desktop compiling
|
||||||
# requires the following packages:
|
# requires the following packages:
|
||||||
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
||||||
LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
|
LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa
|
||||||
else
|
else
|
||||||
# libraries for Windows desktop compiling
|
# libraries for Windows desktop compiling
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
||||||
|
|||||||
@@ -109,7 +109,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LFLAGS = -L. -L../../src
|
LFLAGS = -L. -L../../src
|
||||||
else
|
else
|
||||||
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
LFLAGS = -L. -L../../src
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
LFLAGS += -LC:/raylib/raylib/src
|
||||||
|
endif
|
||||||
# external libraries to link with
|
# external libraries to link with
|
||||||
# GLFW3
|
# GLFW3
|
||||||
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
||||||
@@ -134,7 +137,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# libraries for OS X 10.9 desktop compiling
|
# libraries for OS X 10.9 desktop compiling
|
||||||
# requires the following packages:
|
# requires the following packages:
|
||||||
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
||||||
LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
|
LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa
|
||||||
else
|
else
|
||||||
# libraries for Windows desktop compiling
|
# libraries for Windows desktop compiling
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
||||||
|
|||||||
@@ -109,7 +109,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LFLAGS = -L. -L../../src
|
LFLAGS = -L. -L../../src
|
||||||
else
|
else
|
||||||
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
|
LFLAGS = -L. -L../../src
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
LFLAGS += -LC:/raylib/raylib/src
|
||||||
|
endif
|
||||||
# external libraries to link with
|
# external libraries to link with
|
||||||
# GLFW3
|
# GLFW3
|
||||||
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
|
||||||
@@ -134,7 +137,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
# libraries for OS X 10.9 desktop compiling
|
# libraries for OS X 10.9 desktop compiling
|
||||||
# requires the following packages:
|
# requires the following packages:
|
||||||
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# libglfw3-dev libopenal-dev libegl1-mesa-dev
|
||||||
LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
|
LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa
|
||||||
else
|
else
|
||||||
# libraries for Windows desktop compiling
|
# libraries for Windows desktop compiling
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
||||||
|
|||||||
Reference in New Issue
Block a user