Skip to content

Commit

Permalink
fix: disable Raylib warnings during release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Mar 25, 2024
1 parent 69a56c3 commit 24e861e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,19 @@ OBJS := $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o, $(SRCS))
# Build flags
CC = gcc
AR = ar -rc
ifndef D
DISABLE_ASSERTS = -D NDEBUG
endif
RAYLIB_CPPFLAGS = $(DISABLE_ASSERTS) -D PLATFORM_DESKTOP -I $(RAYLIB_SRC_DIR) -I $(RAYLIB_SRC_DIR)/external/glfw/$(HDR_DIR)
CPPFLAGS = $(DISABLE_ASSERTS) -I $(RAYLIB_SRC_DIR) -I $(HDR_DIR)
ifdef D
DEBUG_OPTS = -ggdb
DEBUG_SYM_OPTS = -ggdb
else
RELEASE_OPTS = -pipe -O3
STRIP_OPTS = -s
DISABLE_ASSERTS_OPTS = -D NDEBUG
HIDE_WARNS_OPTS = -w
RELEASE_OPTS = -pipe -O3
STRIP_OPTS = -s
endif
RAYLIB_CFLAGS = -std=gnu99 $(DEBUG_OPTS) $(RELEASE_OPTS)
CFLAGS = -std=c17 -Wall -Wextra -pedantic $(DEBUG_OPTS) $(RELEASE_OPTS)
LDFLAGS = -Wl,--build-id $(STRIP_OPTS) $(RELEASE_OPTS) -L $(BUILD_DIR) -lraylib -lm
RAYLIB_CPPFLAGS = $(DISABLE_ASSERTS) -D PLATFORM_DESKTOP -I $(RAYLIB_SRC_DIR) -I $(RAYLIB_SRC_DIR)/external/glfw/$(HDR_DIR)
CPPFLAGS = $(DISABLE_ASSERTS) -I $(RAYLIB_SRC_DIR) -I $(HDR_DIR)
RAYLIB_CFLAGS = -std=gnu99 $(HIDE_WARNS_OPTS) $(DEBUG_SYM_OPTS) $(RELEASE_OPTS)
CFLAGS = -std=c17 -Wall -Wextra -pedantic $(DEBUG_SYM_OPTS) $(RELEASE_OPTS)
LDFLAGS = -Wl,--build-id $(STRIP_OPTS) $(RELEASE_OPTS) -L $(BUILD_DIR) -lraylib -lm

# Build output
RAYLIB_OUT = $(BUILD_DIR)/libraylib.a
Expand Down

0 comments on commit 24e861e

Please sign in to comment.