aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2016-02-20 01:09:47 +0100
committerRay <raysan5@gmail.com>2016-02-20 01:09:47 +0100
commit4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf (patch)
treed9ee679c3b0bc5d4a20b31930994deb0e4c37948 /src/makefile
parentf582ab06add085594f2579ee6e7d625212abd204 (diff)
parent954ced21a42eb489ad382b4c00406a28778fee41 (diff)
downloadraylib-4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf.tar.gz
raylib-4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf.zip
Merge pull request #83 from raysan5/develop
Develop branch integration
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/makefile b/src/makefile
index a42bf060..2d73e646 100644
--- a/src/makefile
+++ b/src/makefile
@@ -47,7 +47,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
# define raylib graphics api to use (on RPI, OpenGL ES 2.0 must be used)
GRAPHICS = GRAPHICS_API_OPENGL_ES2
else
- # define raylib graphics api to use (on Windows desktop, OpenGL 1.1 by default)
+ # define raylib graphics api to use (OpenGL 1.1 by default)
GRAPHICS ?= GRAPHICS_API_OPENGL_11
#GRAPHICS = GRAPHICS_API_OPENGL_33 # Uncomment to use OpenGL 3.3
endif
@@ -67,14 +67,12 @@ else
endif
# define compiler flags:
-# -O2 defines optimization level
-# -Wall turns on most, but not all, compiler warnings
-# -std=c99 use standard C from 1999 revision
-ifeq ($(PLATFORM),PLATFORM_RPI)
- CFLAGS = -O1 -Wall -std=gnu99 -fgnu89-inline
-else
- CFLAGS = -O1 -Wall -std=gnu99
-endif
+# -O1 defines optimization level
+# -Wall turns on most, but not all, compiler warnings
+# -std=c99 defines C language mode (standard C from 1999 revision)
+# -std=gnu99 defines C language mode (GNU C from 1999 revision)
+# -fgnu89-inline declaring inline functions support (GCC optimized, faster)
+CFLAGS = -O1 -Wall -std=gnu99 -fgnu89-inline
#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
@@ -93,7 +91,13 @@ else
endif
# define all object files required
-OBJS = core.o rlgl.o raymath.o shapes.o text.o textures.o models.o audio.o utils.o camera.o gestures.o stb_vorbis.o
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+ OBJS = core.o rlgl.o glad.o shapes.o text.o textures.o models.o audio.o utils.o camera.o gestures.o stb_vorbis.o
+else
+ #GLAD only required on desktop platform
+ OBJS = core.o rlgl.o shapes.o text.o textures.o models.o audio.o stb_vorbis.o utils.o camera.o gestures.o
+endif
+
# typing 'make' will invoke the first target entry in the file,
# in this case, the 'default' target entry is raylib
@@ -116,9 +120,9 @@ core.o: core.c
rlgl.o: rlgl.c
$(CC) -c rlgl.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
-# compile raymath module
-raymath.o: raymath.c
- $(CC) -c raymath.c $(CFLAGS) $(INCLUDES)
+# compile glad module
+glad.o: glad.c
+ $(CC) -c glad.c $(CFLAGS) $(INCLUDES)
# compile shapes module
shapes.o: shapes.c