From c862c4bdf2628aa906c98a114b8380a2f673f400 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Wed, 29 Dec 2021 19:06:43 +0100 Subject: [PATCH] Support CUSTOM_CFLAGS --- src/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 8ddb207ca..1d7c25422 100644 --- a/src/Makefile +++ b/src/Makefile @@ -74,6 +74,8 @@ RAYLIB_CONFIG_FLAGS ?= NONE # Options: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB PLATFORM ?= PLATFORM_DESKTOP +# To define additional cflags: Use make CUSTOM_CFLAGS="" + # Include raylib modules on compilation # NOTE: Some programs like tools could not require those modules RAYLIB_MODULE_AUDIO ?= TRUE @@ -275,7 +277,7 @@ endif # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec # -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers # -fno-strict-aliasing jar_xm.h does shady stuff (breaks strict aliasing) -CFLAGS = -Wall -D_DEFAULT_SOURCE -D$(PLATFORM) -D$(GRAPHICS) -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing +CFLAGS = -Wall -D_DEFAULT_SOURCE -D$(PLATFORM) -D$(GRAPHICS) -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing $(CUSTOM_CFLAGS) ifneq ($(RAYLIB_CONFIG_FLAGS), NONE) CFLAGS += -DEXTERNAL_CONFIG_FLAGS $(RAYLIB_CONFIG_FLAGS)