diff options
| author | Ray <raysan5@gmail.com> | 2015-01-08 20:32:30 +0100 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2015-01-08 20:32:30 +0100 |
| commit | e37ef10595867e4f189fff0f87db5e6fdfcfc4d0 (patch) | |
| tree | 0410f5604cc3cfc036f6c1f3ac4333ac33726660 /src/makefile | |
| parent | fad81f36e4cfd37901caad8555c49c41ac65aaee (diff) | |
| parent | 4a7e522d4bb376d2277895d1d99eb0382f8bbefb (diff) | |
| download | raylib-e37ef10595867e4f189fff0f87db5e6fdfcfc4d0.tar.gz raylib-e37ef10595867e4f189fff0f87db5e6fdfcfc4d0.zip | |
Merge pull request #14 from raysan5/master
Integrate master into develop branch
Diffstat (limited to 'src/makefile')
| -rw-r--r-- | src/makefile | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/src/makefile b/src/makefile index 501bd0c9..8566abe4 100644 --- a/src/makefile +++ b/src/makefile @@ -25,6 +25,23 @@ # possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB PLATFORM ?= PLATFORM_DESKTOP +# determine SUBPLATFORM in case PLATFORM_DESKTOP selected +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows + ifeq ($(OS),Windows_NT) + SUBPLATFORM=WINDOWS + else + UNAMEOS:=$(shell uname) + ifeq ($(UNAMEOS),Linux) + SUBPLATFORM=LINUX + else + ifeq ($(UNAMEOS),Darwin) + SUBPLATFORM=OSX + endif + endif + endif +endif + # define raylib graphics api depending on selected platform ifeq ($(PLATFORM),PLATFORM_RPI) # define raylib graphics api to use (on RPI, OpenGL ES 2.0 must be used) @@ -34,7 +51,6 @@ else GRAPHICS ?= GRAPHICS_API_OPENGL_11 #GRAPHICS = GRAPHICS_API_OPENGL_33 # Uncomment to use OpenGL 3.3 endif - ifeq ($(PLATFORM),PLATFORM_WEB) GRAPHICS = GRAPHICS_API_OPENGL_ES2 endif @@ -66,7 +82,7 @@ endif ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads else - INCLUDES = -I. + INCLUDES = -I. -I../external/glfw3/include/ -I../external/openal_soft/include/ endif # define all object files required @@ -127,19 +143,23 @@ stb_vorbis.o: stb_vorbis.c # clean everything clean: +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(SUBPLATFORM),OSX) + rm -f *.o libraylib.a + else + ifeq ($(SUBPLATFORM),LINUX) + find . -type f -executable -delete + rm -f *.o libraylib.a + else + del *.o libraylib.a + endif + endif +endif ifeq ($(PLATFORM),PLATFORM_RPI) rm -f *.o libraylib.a -else -ifeq ($(PLATFORM),PLATFORM_DESKTOP_LINUX) - find . -type f -executable -delete - rm -f *.o libraylib.a -else +endif ifeq ($(PLATFORM),PLATFORM_WEB) del *.o libraylib.bc -else - del *.o libraylib.a -endif -endif endif @echo Cleaning done |
