Преглед на файлове

Fixes for makefiles, GLFW 3.1 library for Linux

Constantine Tarasenkov преди 10 години
родител
ревизия
b92c1bbbf7

+ 9 - 10
examples/makefile

@@ -113,20 +113,20 @@ 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
-        LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
-    endif
+        # libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -pthread
+    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
-	LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
-
+        # libraries for OS X 10.9 desktop compiling
+        # requires the following packages:
+        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
     else
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
     endif
+    endif
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     # libraries for Raspberry Pi compiling
@@ -327,8 +327,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o
+		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
     else
 		del *.o *.exe
     endif

BIN
external/glfw3/lib/linux/libglfw3.a


+ 1 - 2
src/makefile

@@ -155,8 +155,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o libraylib.a
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o libraylib.a
+		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
     else
 		del *.o libraylib.a
     endif

+ 9 - 10
templates/advance_game/makefile

@@ -115,20 +115,20 @@ 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
-        LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
-    endif
+        # libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -pthread
+    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
-	LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
-
+        # libraries for OS X 10.9 desktop compiling
+        # requires the following packages:
+        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
     else
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
     endif
+    endif
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     # libraries for Raspberry Pi compiling
@@ -194,8 +194,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o
+		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
     else
 		del *.o *.exe
     endif

+ 9 - 10
templates/basic_game/makefile

@@ -115,20 +115,20 @@ 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
-        LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
-    endif
+        # libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -pthread
+    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
-	LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
-
+        # libraries for OS X 10.9 desktop compiling
+        # requires the following packages:
+        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
     else
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
     endif
+    endif
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     # libraries for Raspberry Pi compiling
@@ -166,8 +166,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o
+		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
     else
 		del *.o *.exe
     endif

+ 8 - 9
templates/basic_test/makefile

@@ -115,20 +115,20 @@ 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
-        LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
-    endif
+        # libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -pthread
+    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
-	LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
-
+        # requires the following packages:
+        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
     else
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
     endif
+    endif
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     # libraries for Raspberry Pi compiling
@@ -166,8 +166,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o
+		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
     else
 		del *.o *.exe
     endif

+ 9 - 10
templates/simple_game/makefile

@@ -115,20 +115,20 @@ 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
-        LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
-    endif
+        # libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -pthread
+    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
-	LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
-
+        # libraries for OS X 10.9 desktop compiling
+        # requires the following packages:
+        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
     else
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
     endif
+    endif
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     # libraries for Raspberry Pi compiling
@@ -170,8 +170,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o
+		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
     else
 		del *.o *.exe
     endif

+ 9 - 10
templates/standard_game/makefile

@@ -115,20 +115,20 @@ 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
-        LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
-    endif
+        # libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -pthread
+    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
-	LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
-
+        # libraries for OS X 10.9 desktop compiling
+        # requires the following packages:
+        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
     else
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
     endif
+    endif
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     # libraries for Raspberry Pi compiling
@@ -194,8 +194,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 		rm -f *.o
     else
     ifeq ($(PLATFORM_OS),LINUX)
-		find . -type f -executable -delete
-		rm -f *.o
+		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
     else
 		del *.o *.exe
     endif