From 565b1089bd6a4c97957c0c3df1a1ed2b829d2183 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sun, 3 Apr 2016 15:58:44 +0200 Subject: [PATCH 1/3] Remove duplicate code --- examples/Makefile | 22 ---------------------- templates/advance_game/Makefile | 22 ---------------------- templates/basic_game/Makefile | 22 ---------------------- templates/basic_test/Makefile | 22 ---------------------- templates/simple_game/Makefile | 22 ---------------------- templates/standard_game/Makefile | 22 ---------------------- 6 files changed, 132 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index e62488ae1..cb59654f2 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -119,28 +119,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) diff --git a/templates/advance_game/Makefile b/templates/advance_game/Makefile index d790fe261..2c79a5ca8 100644 --- a/templates/advance_game/Makefile +++ b/templates/advance_game/Makefile @@ -122,28 +122,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) diff --git a/templates/basic_game/Makefile b/templates/basic_game/Makefile index 428c980ae..178e16fc0 100644 --- a/templates/basic_game/Makefile +++ b/templates/basic_game/Makefile @@ -122,28 +122,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) diff --git a/templates/basic_test/Makefile b/templates/basic_test/Makefile index 835484f6b..1fda24a2b 100644 --- a/templates/basic_test/Makefile +++ b/templates/basic_test/Makefile @@ -121,28 +121,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) diff --git a/templates/simple_game/Makefile b/templates/simple_game/Makefile index 707f858d1..e2e6a09f2 100644 --- a/templates/simple_game/Makefile +++ b/templates/simple_game/Makefile @@ -122,28 +122,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) diff --git a/templates/standard_game/Makefile b/templates/standard_game/Makefile index 6c67be42a..4ba7bf285 100644 --- a/templates/standard_game/Makefile +++ b/templates/standard_game/Makefile @@ -122,28 +122,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) From f2f4079411472e835263a7a59ed58dba380ecca6 Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sun, 3 Apr 2016 16:05:23 +0200 Subject: [PATCH 2/3] Remove recipes of GLEW from Makefile (not used any more) --- examples/Makefile | 8 ++------ src/Makefile | 4 +--- templates/advance_game/Makefile | 8 ++------ templates/basic_game/Makefile | 8 ++------ templates/basic_test/Makefile | 8 ++------ templates/simple_game/Makefile | 8 ++------ templates/standard_game/Makefile | 8 ++------ 7 files changed, 13 insertions(+), 39 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index cb59654f2..74335fe84 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -90,8 +90,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # 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 @@ -113,8 +111,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 @@ -125,14 +121,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev 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 # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa else # libraries for Windows desktop compiling diff --git a/src/Makefile b/src/Makefile index cab2ced06..8aeb00d7a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -84,8 +84,6 @@ else # external libraries headers # GLFW3 INCLUDES += -I../external/glfw3/include -# GLEW - INCLUDES += -I../external/glew/include # OpenAL Soft INCLUDES += -I../external/openal_soft/include endif @@ -143,7 +141,7 @@ models.o: models.c # compile audio module audio.o: audio.c $(CC) -c audio.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) - + # compile stb_vorbis library stb_vorbis.o: stb_vorbis.c $(CC) -c stb_vorbis.c -O1 $(INCLUDES) -D$(PLATFORM) diff --git a/templates/advance_game/Makefile b/templates/advance_game/Makefile index 2c79a5ca8..17b16c1a8 100644 --- a/templates/advance_game/Makefile +++ b/templates/advance_game/Makefile @@ -93,8 +93,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # 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 @@ -116,8 +114,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 @@ -128,14 +124,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev 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 # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa else # libraries for Windows desktop compiling diff --git a/templates/basic_game/Makefile b/templates/basic_game/Makefile index 178e16fc0..f512a180f 100644 --- a/templates/basic_game/Makefile +++ b/templates/basic_game/Makefile @@ -93,8 +93,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # 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 @@ -116,8 +114,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 @@ -128,14 +124,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev 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 # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa else # libraries for Windows desktop compiling diff --git a/templates/basic_test/Makefile b/templates/basic_test/Makefile index 1fda24a2b..95b8cd158 100644 --- a/templates/basic_test/Makefile +++ b/templates/basic_test/Makefile @@ -92,8 +92,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # 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 @@ -115,8 +113,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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,14 +123,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev 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 # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa else # libraries for Windows desktop compiling diff --git a/templates/simple_game/Makefile b/templates/simple_game/Makefile index e2e6a09f2..de3401f77 100644 --- a/templates/simple_game/Makefile +++ b/templates/simple_game/Makefile @@ -93,8 +93,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # 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 @@ -116,8 +114,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 @@ -128,14 +124,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev 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 # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa else # libraries for Windows desktop compiling diff --git a/templates/standard_game/Makefile b/templates/standard_game/Makefile index 4ba7bf285..c88c82117 100644 --- a/templates/standard_game/Makefile +++ b/templates/standard_game/Makefile @@ -93,8 +93,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # 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 @@ -116,8 +114,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 @@ -128,14 +124,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev 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 # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev + # libglfw3-dev libopenal-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa else # libraries for Windows desktop compiling From a04a7b6ea53ed291a742baf764bd604d9fc7b70e Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sun, 3 Apr 2016 16:07:44 +0200 Subject: [PATCH 3/3] Fix cleaning recipies for GNU/Linux --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 8aeb00d7a..76dbfc678 100644 --- a/src/Makefile +++ b/src/Makefile @@ -165,7 +165,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) rm -f *.o libraylib.a else ifeq ($(PLATFORM_OS),LINUX) - find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f + rm -f *.o libraylib.a else del *.o libraylib.a endif