Support externally provided compilation flags

Useful in case raylib compilation want to be automated and compilation config flags provided by command line.
This commit is contained in:
Ray 2018-12-18 00:20:08 +01:00
parent fe346fa8d8
commit f822650a3b
6 changed files with 29 additions and 6 deletions

View File

@ -74,8 +74,11 @@
#include "audio.h"
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
#else
#include "config.h" // Defines module configuration flags
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#include "utils.h" // Required for: fopen() Android mapping
#endif

View File

@ -87,9 +87,13 @@
*
**********************************************************************************************/
#include "config.h" // Defines module configuration flags
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#if (defined(__linux__) || defined(PLATFORM_WEB)) && _POSIX_C_SOURCE < 199309L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199309L // Required for CLOCK_MONOTONIC if compiled with c99 without gnu ext.

View File

@ -36,9 +36,13 @@
*
**********************************************************************************************/
#include "config.h" // Defines module configuration flags
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#include "utils.h" // Required for: fopen() Android mapping
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fscanf(), feof(), rewind(), fgets()

View File

@ -33,9 +33,13 @@
*
**********************************************************************************************/
#include "config.h" // Defines module configuration flags
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 2.1, 3.3+ or ES2
#include <stdlib.h> // Required for: abs(), fabs()

View File

@ -36,9 +36,13 @@
*
**********************************************************************************************/
#include "config.h" // Defines module configuration flags
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#include <stdlib.h> // Required for: malloc(), free()
#include <string.h> // Required for: strlen()
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()

View File

@ -56,9 +56,13 @@
*
**********************************************************************************************/
#include "config.h" // Defines module configuration flags
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#include <stdlib.h> // Required for: malloc(), free()
#include <string.h> // Required for: strlen()