From d07e4f44f18887a54a25748ce7f5b9e6cf310b22 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sat, 12 Mar 2016 18:40:52 +0100 Subject: [PATCH 1/7] Edit the default target to conform to GNU standards I've changed all default target names with 'all'. Here there is the explanation: . --- examples/makefile | 4 ++-- templates/advance_game/makefile | 4 ++-- templates/basic_game/makefile | 4 ++-- templates/basic_test/makefile | 4 ++-- templates/simple_game/makefile | 4 ++-- templates/standard_game/makefile | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/makefile b/examples/makefile index 2a9e88ba3..23931c98c 100644 --- a/examples/makefile +++ b/examples/makefile @@ -202,9 +202,9 @@ EXAMPLES = \ fix_dylib \ -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is raylib -default: examples +all: examples # compile all examples examples: $(EXAMPLES) diff --git a/templates/advance_game/makefile b/templates/advance_game/makefile index e19eb746a..975fb4c5a 100644 --- a/templates/advance_game/makefile +++ b/templates/advance_game/makefile @@ -162,9 +162,9 @@ SCREENS = \ screens/screen_gameplay.o \ screens/screen_ending.o \ -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is advance_game -default: advance_game +all: advance_game # compile template - advance_game advance_game: advance_game.c $(SCREENS) diff --git a/templates/basic_game/makefile b/templates/basic_game/makefile index 057320403..41d9379e4 100644 --- a/templates/basic_game/makefile +++ b/templates/basic_game/makefile @@ -154,9 +154,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html endif -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is basic_game -default: basic_game +all: basic_game # compile template - basic_game basic_game: basic_game.c diff --git a/templates/basic_test/makefile b/templates/basic_test/makefile index a0ed2608f..5654b2246 100644 --- a/templates/basic_test/makefile +++ b/templates/basic_test/makefile @@ -153,9 +153,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html endif -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is basic_test -default: basic_test +all: basic_test # compile template - basic_test basic_test: basic_test.c diff --git a/templates/simple_game/makefile b/templates/simple_game/makefile index 41fef740a..c94389a4c 100644 --- a/templates/simple_game/makefile +++ b/templates/simple_game/makefile @@ -154,9 +154,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html endif -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is simple_game -default: simple_game +all: simple_game # compile template - simple_game simple_game: simple_game.c screens.o diff --git a/templates/standard_game/makefile b/templates/standard_game/makefile index 90f0e6f2f..ca4ed475a 100644 --- a/templates/standard_game/makefile +++ b/templates/standard_game/makefile @@ -162,9 +162,9 @@ SCREENS = \ screens/screen_gameplay.o \ screens/screen_ending.o \ -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is standard_game -default: standard_game +all: standard_game # compile template - standard_game standard_game: standard_game.c $(SCREENS) From c5931c75c64bfcc582ca7ed646ca5cdd0b876fbb Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sat, 12 Mar 2016 18:49:28 +0100 Subject: [PATCH 2/7] Update GNU/Linux compilation If you have raylib on standard directories ("/usr/local/include/raylib/raylib.h" for the header and "/usr/local/lib/libraylib.a" for raylib library) you can compile without edit the makefile. --- examples/makefile | 26 ++++++++++++++++---------- templates/advance_game/makefile | 24 +++++++++++++++--------- templates/basic_game/makefile | 24 +++++++++++++++--------- templates/basic_test/makefile | 24 +++++++++++++++--------- templates/simple_game/makefile | 24 +++++++++++++++--------- templates/standard_game/makefile | 24 +++++++++++++++--------- 6 files changed, 91 insertions(+), 55 deletions(-) diff --git a/examples/makefile b/examples/makefile index 23931c98c..f432c7838 100644 --- a/examples/makefile +++ b/examples/makefile @@ -79,16 +79,22 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../src -# external libraries headers -# GLFW3 - INCLUDES += -I../external/glfw3/include -# GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include -# OpenAL Soft - INCLUDES += -I../external/openal_soft/include + INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../src + # external libraries headers + # GLFW3 + INCLUDES += -I../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../external/openal_soft/include + endif endif # define library paths containing required libs diff --git a/templates/advance_game/makefile b/templates/advance_game/makefile index 975fb4c5a..ed50d6463 100644 --- a/templates/advance_game/makefile +++ b/templates/advance_game/makefile @@ -83,15 +83,21 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs diff --git a/templates/basic_game/makefile b/templates/basic_game/makefile index 41d9379e4..ccca5bd17 100644 --- a/templates/basic_game/makefile +++ b/templates/basic_game/makefile @@ -83,15 +83,21 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs diff --git a/templates/basic_test/makefile b/templates/basic_test/makefile index 5654b2246..112920a0a 100644 --- a/templates/basic_test/makefile +++ b/templates/basic_test/makefile @@ -82,15 +82,21 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs diff --git a/templates/simple_game/makefile b/templates/simple_game/makefile index c94389a4c..cc193442e 100644 --- a/templates/simple_game/makefile +++ b/templates/simple_game/makefile @@ -83,15 +83,21 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs diff --git a/templates/standard_game/makefile b/templates/standard_game/makefile index ca4ed475a..d70c90e49 100644 --- a/templates/standard_game/makefile +++ b/templates/standard_game/makefile @@ -83,15 +83,21 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs From ea8363a3b0c87629d027e4aad13654e5cf6b2fe9 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sat, 12 Mar 2016 19:08:54 +0100 Subject: [PATCH 3/7] Update "libraries" and "includes" section I've cleaned the GNU/Linux compilation, now you can compile without useless parameters. --- examples/makefile | 28 +++++++++++------- templates/advance_game/makefile | 50 +++++++++++++++++++++++++------- templates/basic_game/makefile | 28 +++++++++++------- templates/basic_test/makefile | 30 +++++++++++-------- templates/simple_game/makefile | 28 +++++++++++------- templates/standard_game/makefile | 28 +++++++++++------- 6 files changed, 125 insertions(+), 67 deletions(-) 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 From 4d8f18e00b1755c88fb9702e4c467884f43009bd Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sat, 12 Mar 2016 19:39:13 +0100 Subject: [PATCH 4/7] Add a missing library for compiling on GNU/Linux I've added "-ldl" library, it's necessary to compile the project. --- examples/makefile | 2 +- templates/advance_game/makefile | 2 +- templates/basic_game/makefile | 2 +- templates/basic_test/makefile | 4 ++-- templates/simple_game/makefile | 2 +- templates/standard_game/makefile | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/makefile b/examples/makefile index beaecfe2f..10237aa6c 100644 --- a/examples/makefile +++ b/examples/makefile @@ -126,7 +126,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else diff --git a/templates/advance_game/makefile b/templates/advance_game/makefile index 8f260e868..0628cb876 100644 --- a/templates/advance_game/makefile +++ b/templates/advance_game/makefile @@ -151,7 +151,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else diff --git a/templates/basic_game/makefile b/templates/basic_game/makefile index ea97d6b9d..3c5119b15 100644 --- a/templates/basic_game/makefile +++ b/templates/basic_game/makefile @@ -129,7 +129,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else diff --git a/templates/basic_test/makefile b/templates/basic_test/makefile index 29685a3bb..84fc24cba 100644 --- a/templates/basic_test/makefile +++ b/templates/basic_test/makefile @@ -128,9 +128,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # 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 040500387..e6c0aaf36 100644 --- a/templates/simple_game/makefile +++ b/templates/simple_game/makefile @@ -129,7 +129,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else diff --git a/templates/standard_game/makefile b/templates/standard_game/makefile index eaae0aebb..cf5e699b5 100644 --- a/templates/standard_game/makefile +++ b/templates/standard_game/makefile @@ -129,7 +129,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else From 2e3e62a413d35eb8d8a64f6ed68881701bfb9bd9 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sat, 12 Mar 2016 20:01:46 +0100 Subject: [PATCH 5/7] Raname all makefile files to "Makefile" I've renamed all makefile files to "Makefile" because they appear in the first files. --- examples/{makefile => Makefile} | 0 src/{makefile => Makefile} | 0 templates/advance_game/{makefile => Makefile} | 0 templates/basic_game/{makefile => Makefile} | 0 templates/basic_test/{makefile => Makefile} | 0 templates/simple_game/{makefile => Makefile} | 0 templates/standard_game/{makefile => Makefile} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename examples/{makefile => Makefile} (100%) rename src/{makefile => Makefile} (100%) rename templates/advance_game/{makefile => Makefile} (100%) rename templates/basic_game/{makefile => Makefile} (100%) rename templates/basic_test/{makefile => Makefile} (100%) rename templates/simple_game/{makefile => Makefile} (100%) rename templates/standard_game/{makefile => Makefile} (100%) diff --git a/examples/makefile b/examples/Makefile similarity index 100% rename from examples/makefile rename to examples/Makefile diff --git a/src/makefile b/src/Makefile similarity index 100% rename from src/makefile rename to src/Makefile diff --git a/templates/advance_game/makefile b/templates/advance_game/Makefile similarity index 100% rename from templates/advance_game/makefile rename to templates/advance_game/Makefile diff --git a/templates/basic_game/makefile b/templates/basic_game/Makefile similarity index 100% rename from templates/basic_game/makefile rename to templates/basic_game/Makefile diff --git a/templates/basic_test/makefile b/templates/basic_test/Makefile similarity index 100% rename from templates/basic_test/makefile rename to templates/basic_test/Makefile diff --git a/templates/simple_game/makefile b/templates/simple_game/Makefile similarity index 100% rename from templates/simple_game/makefile rename to templates/simple_game/Makefile diff --git a/templates/standard_game/makefile b/templates/standard_game/Makefile similarity index 100% rename from templates/standard_game/makefile rename to templates/standard_game/Makefile From 530e520727180d1ded6249ffd8cfac4814eae867 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sun, 13 Mar 2016 14:01:12 +0100 Subject: [PATCH 6/7] Convert tabs to spaces when it is possible in Makefile files --- examples/Makefile | 74 +++++++++++++++++++++----------- templates/advance_game/Makefile | 72 +++++++++++++++---------------- templates/basic_game/Makefile | 68 +++++++++++++++++++---------- templates/basic_test/Makefile | 68 +++++++++++++++++++---------- templates/simple_game/Makefile | 68 +++++++++++++++++++---------- templates/standard_game/Makefile | 68 +++++++++++++++++++---------- 6 files changed, 264 insertions(+), 154 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 10237aa6c..13396ed9a 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -82,18 +82,40 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -I/usr/local/include/raylib/ - else - INCLUDES = -I. -I../src - # external libraries headers - # GLFW3 - INCLUDES += -I../external/glfw3/include - # GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include - # OpenAL Soft - INCLUDES += -I../external/openal_soft/include + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + 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: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -102,20 +124,20 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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 @@ -127,8 +149,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + # on XWindow could require also below libraries, just uncomment + #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/templates/advance_game/Makefile b/templates/advance_game/Makefile index 0628cb876..fddc2d921 100644 --- a/templates/advance_game/Makefile +++ b/templates/advance_game/Makefile @@ -85,18 +85,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -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 - # GLFW3 - INCLUDES += -I../../external/glfw3/include - # GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include - # OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include endif endif @@ -105,20 +105,20 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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 @@ -127,20 +127,20 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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 3c5119b15..6980f5ef2 100644 --- a/templates/basic_game/Makefile +++ b/templates/basic_game/Makefile @@ -85,18 +85,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -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 - # GLFW3 - INCLUDES += -I../../external/glfw3/include - # GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include - # OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include endif endif @@ -105,20 +105,42 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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_test/Makefile b/templates/basic_test/Makefile index 84fc24cba..1256e1701 100644 --- a/templates/basic_test/Makefile +++ b/templates/basic_test/Makefile @@ -84,18 +84,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -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 - # GLFW3 - INCLUDES += -I../../external/glfw3/include - # GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include - # OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include endif endif @@ -104,20 +104,42 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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/simple_game/Makefile b/templates/simple_game/Makefile index e6c0aaf36..cd5c3ac89 100644 --- a/templates/simple_game/Makefile +++ b/templates/simple_game/Makefile @@ -85,18 +85,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -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 - # GLFW3 - INCLUDES += -I../../external/glfw3/include - # GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include - # OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include endif endif @@ -105,20 +105,42 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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/standard_game/Makefile b/templates/standard_game/Makefile index cf5e699b5..12a6efa1e 100644 --- a/templates/standard_game/Makefile +++ b/templates/standard_game/Makefile @@ -85,18 +85,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # add standard directories for GNU/Linux ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -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 - # GLFW3 - INCLUDES += -I../../external/glfw3/include - # GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include - # OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include endif endif @@ -105,20 +105,42 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux + # 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 + 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 From 9e7a3b7017446c46e8ad128736a5979402cf09d7 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sun, 13 Mar 2016 19:26:12 +0100 Subject: [PATCH 7/7] Remove GLEW library and uncomment other GNU/Linux dependences --- examples/Makefile | 5 ++--- templates/advance_game/Makefile | 5 ++--- templates/basic_game/Makefile | 5 ++--- templates/basic_test/Makefile | 5 ++--- templates/simple_game/Makefile | 5 ++--- templates/standard_game/Makefile | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 13396ed9a..e62488ae1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -148,9 +148,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/templates/advance_game/Makefile b/templates/advance_game/Makefile index fddc2d921..d790fe261 100644 --- a/templates/advance_game/Makefile +++ b/templates/advance_game/Makefile @@ -151,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/templates/basic_game/Makefile b/templates/basic_game/Makefile index 6980f5ef2..428c980ae 100644 --- a/templates/basic_game/Makefile +++ b/templates/basic_game/Makefile @@ -151,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/templates/basic_test/Makefile b/templates/basic_test/Makefile index 1256e1701..835484f6b 100644 --- a/templates/basic_test/Makefile +++ b/templates/basic_test/Makefile @@ -150,9 +150,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -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 cd5c3ac89..707f858d1 100644 --- a/templates/simple_game/Makefile +++ b/templates/simple_game/Makefile @@ -151,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/templates/standard_game/Makefile b/templates/standard_game/Makefile index 12a6efa1e..6c67be42a 100644 --- a/templates/standard_game/Makefile +++ b/templates/standard_game/Makefile @@ -151,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling