@ -36,19 +36,18 @@  
		
	
		
			
			#
  
		
	
		
			
			#******************************************************************************
  
		
	
		
			
			
  
		
	
		
			
			# Please read the wiki to know how to compile raylib, because there are
  
		
	
		
			
			# different methods. 
  
		
	
		
			
			# Please read the wiki to know how to compile raylib, because there are different methods. 
  
		
	
		
			
			# https://github.com/raysan5/raylib/wiki 
  
		
	
		
			
			
  
		
	
		
			
			.PHONY :  all  clean  install  uninstall  
		
	
		
			
			
  
		
	
		
			
			# Define required raylib variables
  
		
	
		
			
			VERSION      =  1.9.2 
		
	
		
			
			API_VERSION  =  1  
		
	
		
			
			PLATFORM  ?=  PLATFORM_DESKTOP 
		
	
		
			
			RAYLIB_PATH  =  .. 
		
	
		
			
			
  
		
	
		
			
			PLATFORM           ?=  PLATFORM_DESKTOP 
		
	
		
			
			RAYLIB_PATH         =  .. 
		
	
		
			
			RAYLIB_VERSION      =  1.9.2 
		
	
		
			
			RAYLIB_API_VERSION  =  1  
		
	
		
			
			# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
  
		
	
		
			
			RAYLIB_LIBTYPE  ?=  STATIC 
		
	
		
			
			RAYLIB_LIBTYPE      ?=  STATIC 
		
	
		
			
			
  
		
	
		
			
			# Included raylib audio module on compilation
  
		
	
		
			
			# NOTE: Some programs like tools could not require audio support
  
		
	
	
		
			
				
				
					
						 
				
				
					
						 
				
				
				 
			
			@ -120,8 +119,8 @@ endif  
		
	
		
			
			i f e q  ( $( PLATFORM ) , P L A T F O R M _ W E B )  
		
	
		
			
			    # Emscripten required variables   
		
	
		
			
			    EMSDK_PATH  =  C:/emsdk  
		
	
		
			
			    EMSCRIPTEN_VERSION  =  1.37.21   
		
	
		
			
			    CLANG_VERSION = e1.37.21 _64bit  
		
	
		
			
			    EMSCRIPTEN_VERSION  =  1.37.28   
		
	
		
			
			    CLANG_VERSION = e1.37.28 _64bit  
		
	
		
			
			    PYTHON_VERSION = 2.7.5.3_64bit  
		
	
		
			
			    NODE_VERSION = 4.1.1_64bit  
		
	
		
			
			    export  PATH = $( EMSDK_PATH) ; $( EMSDK_PATH) \c lang\$ ( CLANG_VERSION) ; $( EMSDK_PATH) \n ode\$ ( NODE_VERSION) \b in; $( EMSDK_PATH) \p ython\$ ( PYTHON_VERSION) ; $( EMSDK_PATH) \e mscripten\$ ( EMSCRIPTEN_VERSION) ; C:\r aylib\M inGW\b in:$$ ( PATH)   
		
	
	
		
			
				
				
					
						 
				
				
					
						 
				
				
				 
			
			@ -192,7 +191,7 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)  
		
	
		
			
			    GRAPHICS  =  GRAPHICS_API_OPENGL_ES2  
		
	
		
			
			e n d i f  
		
	
		
			
			
  
		
	
		
			
			# Default C compiler: gcc
  
		
	
		
			
			# Define def ault C compiler: gcc
  
		
	
		
			
			# NOTE: define g++ compiler if using C++
  
		
	
		
			
			CC  =  gcc 
		
	
		
			
			
  
		
	
	
		
			
				
				
					
						 
				
				
					
						 
				
				
				 
			
			@ -259,7 +258,7 @@ endif  
		
	
		
			
			#  -std=gnu99           defines C language mode (GNU C from 1999 revision)
  
		
	
		
			
			#  -fgnu89-inline       declaring inline functions support (GCC optimized)
  
		
	
		
			
			#  -Wno-missing-braces  ignore invalid warning (GCC bug 53119)
  
		
	
		
			
			#  -D_DEFAULT_SOURCE    use with -std=c99
  
		
	
		
			
			#  -D_DEFAULT_SOURCE    use with -std=c99 on Linux and PLATFORM_WEB, required for timespec 
  
		
	
		
			
			CFLAGS  +=  -O1 -Wall -std= c99 -D_DEFAULT_SOURCE -fgnu89-inline -Wno-missing-braces 
		
	
		
			
			
  
		
	
		
			
			# Additional flags for compiler (if desired)
  
		
	
	
		
			
				
				
					
						 
				
				
					
						 
				
				
				 
			
			@ -406,30 +405,30 @@ else  
		
	
		
			
			        ifeq ( $( PLATFORM_OS) ,LINUX)   
		
	
		
			
			            # Compile raylib to shared library version for GNU/Linux.   
		
	
		
			
			            # WARNING: you should type "make clean" before doing this target   
		
	
		
			
						$( CC)  -shared -o $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .so $( OBJS)  -Wl,-soname,libraylib.$( API_VERSION) .so -lGL -lm -lpthread -ldl -lrt  
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( VERSION) .so)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .so libraylib.$( API_VERSION) .so  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .so libraylib.so  
		
	
		
			
						$( CC)  -shared -o $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .so $( OBJS)  -Wl,-soname,libraylib.$( RAYLIB_ API_VERSION) .so -lGL -lm -lpthread -ldl -lrt  
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( RAYLIB_ VERSION) .so)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .so libraylib.$( RAYLIB_ API_VERSION) .so  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .so libraylib.so  
		
	
		
			
			        endif  
		
	
		
			
			        ifeq ( $( PLATFORM_OS) ,OSX)   
		
	
		
			
						$( CC)  -dynamiclib -o $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .dylib $( OBJS)  -compatibility_version $( API_VERSION)  -current_version $( VERSION)  -framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa  
		
	
		
			
						install_name_tool -id " libraylib. $( VERSION) .dylib "  $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .dylib  
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( VERSION) .dylib)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .dylib libraylib.$( API_VERSION) .dylib  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .dylib libraylib.dylib  
		
	
		
			
						$( CC)  -dynamiclib -o $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .dylib $( OBJS)  -compatibility_version $( RAYLIB_ API_VERSION)  -current_version $( RAYLIB_ VERSION)  -framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa  
		
	
		
			
						install_name_tool -id " libraylib. $( VERSION) .dylib "  $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .dylib  
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( RAYLIB_ VERSION) .dylib)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .dylib libraylib.$( RAYLIB_ API_VERSION) .dylib  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .dylib libraylib.dylib  
		
	
		
			
			        endif  
		
	
		
			
			        ifeq ( $( PLATFORM_OS) ,FREEBSD)   
		
	
		
			
			        # WARNING: you should type "gmake clean" before doing this target   
		
	
		
			
						$( CC)  -shared -o $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .so $( OBJS)  -Wl,-soname,libraylib.$( API_VERSION) .so -lGL -lpthread  
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( VERSION) .so)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .so libraylib.$( API_VERSION) .so  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .so libraylib.so  
		
	
		
			
						$( CC)  -shared -o $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .so $( OBJS)  -Wl,-soname,libraylib.$( RAYLIB_ API_VERSION) .so -lGL -lpthread  
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( RAYLIB_ VERSION) .so)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .so libraylib.$( RAYLIB_ API_VERSION) .so  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .so libraylib.so  
		
	
		
			
			        endif  
		
	
		
			
			        ifeq ( $( PLATFORM) ,PLATFORM_ANDROID)   
		
	
		
			
						$( CC)  -shared -o $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .so $( OBJS)  $( LDFLAGS)  $( LDLIBS)   
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( VERSION) .so)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .so libraylib.$( API_VERSION) .so  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( VERSION) .so libraylib.so  
		
	
		
			
						$( CC)  -shared -o $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .so $( OBJS)  $( LDFLAGS)  $( LDLIBS)   
		
	
		
			
						@echo " raylib shared library generated (libraylib. $( RAYLIB_ VERSION) .so)! "   
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .so libraylib.$( RAYLIB_ API_VERSION) .so  
		
	
		
			
						cd  $( RAYLIB_RELEASE_PATH)  &&  ln -fs libraylib.$( RAYLIB_ VERSION) .so libraylib.so  
		
	
		
			
			        endif  
		
	
		
			
			    else   
		
	
		
			
			        # Compile raylib static library   
		
	
	
		
			
				
				
					
						 
				
				
					
						 
				
				
				 
			
			@ -495,8 +494,8 @@ ifeq ($(ROOT),root)  
		
	
		
			
			        # /usr/local/include/) are for libraries that are installed   
		
	
		
			
			        # manually (without a package manager).   
		
	
		
			
			        ifeq ( $( RAYLIB_LIBTYPE) ,SHARED)   
		
	
		
			
						cp --update $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .so /usr/local/lib/libraylib.$( VERSION) .so  
		
	
		
			
						cp --update $( RAYLIB_RELEASE_PATH) /libraylib.$( API_VERSION) .so /usr/local/lib/libraylib.$( API_VERSION) .so  
		
	
		
			
						cp --update $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .so /usr/local/lib/libraylib.$( RAYLIB_ VERSION) .so  
		
	
		
			
						cp --update $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ API_VERSION) .so /usr/local/lib/libraylib.$( RAYLIB_ API_VERSION) .so  
		
	
		
			
						cp --update $( RAYLIB_RELEASE_PATH) /libraylib.so /usr/local/lib/libraylib.so  
		
	
		
			
			        else   
		
	
		
			
						cp --update raylib.h /usr/local/include/raylib.h  
		
	
	
		
			
				
				
				
				
					
						 
				
				 
			
			@ -518,8 +517,8 @@ ifeq ($(ROOT),root)  
		
	
		
			
						rm --force /usr/local/include/raylib.h  
		
	
		
			
			        ifeq ( $( RAYLIB_LIBTYPE) ,SHARED)   
		
	
		
			
						rm --force /usr/local/lib/libraylib.so  
		
	
		
			
						rm --force /usr/local/lib/libraylib.$( API_VERSION) .so  
		
	
		
			
						rm --force /usr/local/lib/libraylib.$( VERSION) .so  
		
	
		
			
						rm --force /usr/local/lib/libraylib.$( RAYLIB_ API_VERSION) .so  
		
	
		
			
						rm --force /usr/local/lib/libraylib.$( RAYLIB_ VERSION) .so  
		
	
		
			
			        else   
		
	
		
			
						rm --force /usr/local/lib/libraylib.a  
		
	
		
			
			        endif  
		
	
	
		
			
				
				
				
				
					
						 
				
				 
			
			@ -536,7 +535,7 @@ clean:  
		
	
		
			
			i f e q  ( $( PLATFORM_OS ) , W I N D O W S )  
		
	
		
			
				del *.o $( RAYLIB_RELEASE_PATH) /libraylib.a $( RAYLIB_RELEASE_PATH) /libraylib.bc $( RAYLIB_RELEASE_PATH) /libraylib.so external/stb_vorbis.o  
		
	
		
			
			e l s e  
		
	
		
			
				rm -f *.o $( RAYLIB_RELEASE_PATH) /libraylib.a $( RAYLIB_RELEASE_PATH) /libraylib.bc $( RAYLIB_RELEASE_PATH) /libraylib.so $( RAYLIB_RELEASE_PATH) /libraylib.$( API_VERSION) .so $( RAYLIB_RELEASE_PATH) /libraylib.$( VERSION) .so external/stb_vorbis.o  
		
	
		
			
				rm -f *.o $( RAYLIB_RELEASE_PATH) /libraylib.a $( RAYLIB_RELEASE_PATH) /libraylib.bc $( RAYLIB_RELEASE_PATH) /libraylib.so $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ API_VERSION) .so $( RAYLIB_RELEASE_PATH) /libraylib.$( RAYLIB_ VERSION) .so external/stb_vorbis.o  
		
	
		
			
			e n d i f  
		
	
		
			
			i f e q  ( $( PLATFORM ) , P L A T F O R M _ A N D R O I D )  
		
	
		
			
				rm -rf $( ANDROID_TOOLCHAIN)