diff --git a/examples/makefile b/examples/makefile index f432c7838..beaecfe2f 100644 --- a/examples/makefile +++ b/examples/makefile @@ -99,17 +99,23 @@ endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../src -L/opt/vc/lib -else - LFLAGS = -L. -L../src -# external libraries to link with -# GLFW3 - LFLAGS += -L../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) - # GLEW - Not required any more, replaced by GLAD - #LFLAGS += -L../external/glew/lib/$(LIBPATH) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif diff --git a/templates/advance_game/makefile b/templates/advance_game/makefile index ed50d6463..8f260e868 100644 --- a/templates/advance_game/makefile +++ b/templates/advance_game/makefile @@ -87,7 +87,7 @@ endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I/usr/local/include/raylib/ + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ else INCLUDES = -I. -I../../src -IC:/raylib/raylib/src # external libraries headers @@ -103,16 +103,44 @@ endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif diff --git a/templates/basic_game/makefile b/templates/basic_game/makefile index ccca5bd17..ea97d6b9d 100644 --- a/templates/basic_game/makefile +++ b/templates/basic_game/makefile @@ -87,7 +87,7 @@ endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I/usr/local/include/raylib/ + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ else INCLUDES = -I. -I../../src -IC:/raylib/raylib/src # external libraries headers @@ -103,16 +103,22 @@ endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif diff --git a/templates/basic_test/makefile b/templates/basic_test/makefile index 112920a0a..29685a3bb 100644 --- a/templates/basic_test/makefile +++ b/templates/basic_test/makefile @@ -86,7 +86,7 @@ endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I/usr/local/include/raylib/ + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ else INCLUDES = -I. -I../../src -IC:/raylib/raylib/src # external libraries headers @@ -102,16 +102,22 @@ endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW - LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -124,7 +130,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/templates/simple_game/makefile b/templates/simple_game/makefile index cc193442e..040500387 100644 --- a/templates/simple_game/makefile +++ b/templates/simple_game/makefile @@ -87,7 +87,7 @@ endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I/usr/local/include/raylib/ + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ else INCLUDES = -I. -I../../src -IC:/raylib/raylib/src # external libraries headers @@ -103,16 +103,22 @@ endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif diff --git a/templates/standard_game/makefile b/templates/standard_game/makefile index d70c90e49..eaae0aebb 100644 --- a/templates/standard_game/makefile +++ b/templates/standard_game/makefile @@ -87,7 +87,7 @@ endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I/usr/local/include/raylib/ + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ else INCLUDES = -I. -I../../src -IC:/raylib/raylib/src # external libraries headers @@ -103,16 +103,22 @@ endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif