From 2a92d6af3e63fcc47d1030c1274223afb4163a4b Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 16 Mar 2019 13:02:16 +0100 Subject: [PATCH] Support no-audio no-models modules compilation Renamed flags for convenience. --- src/CMakeLists.txt | 2 +- src/Makefile | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 104d6d2d4..c65a4996f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,7 +49,7 @@ if(USE_AUDIO) set(sources ${raylib_sources}) else() MESSAGE(STATUS "Audio Backend: None (-DUSE_AUDIO=OFF)") - set(INCLUDE_AUDIO_MODULE 0) + set(RAYLIB_MODULE_AUDIO 0) list(REMOVE_ITEM raylib_sources ${CMAKE_CURRENT_SOURCE_DIR}/raudio.c) set(sources ${raylib_sources}) endif() diff --git a/src/Makefile b/src/Makefile index 4fbe16687..e483c64fc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -59,9 +59,10 @@ RAYLIB_LIBTYPE ?= STATIC # Build mode for library: DEBUG or RELEASE RAYLIB_BUILD_MODE ?= RELEASE -# Included raylib audio module on compilation -# NOTE: Some programs like tools could not require audio support -INCLUDE_AUDIO_MODULE ?= TRUE +# Include raylib modules on compilation +# NOTE: Some programs like tools could not require those modules +RAYLIB_MODULE_AUDIO ?= TRUE +RAYLIB_MODULE_MODELS ?= TRUE # Use external GLFW library instead of rglfw module # TODO: Review usage of examples on Linux. @@ -393,7 +394,6 @@ OBJS = core.o \ shapes.o \ textures.o \ text.o \ - models.o \ utils.o ifeq ($(PLATFORM),PLATFORM_DESKTOP) @@ -401,8 +401,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) OBJS += rglfw.o endif endif - -ifeq ($(INCLUDE_AUDIO_MODULE),TRUE) +ifeq ($(RAYLIB_MODULE_MODELS),TRUE) + OBJS += models.o +endif +ifeq ($(RAYLIB_MODULE_AUDIO),TRUE) OBJS += raudio.o endif