Browse Source

Support externally provided compilation flags

Useful in case raylib compilation want to be automated and compilation config flags provided by command line.
pull/703/head
Ray 6 years ago
parent
commit
f822650a3b
6 changed files with 29 additions and 6 deletions
  1. +4
    -1
      src/audio.c
  2. +5
    -1
      src/core.c
  3. +5
    -1
      src/models.c
  4. +5
    -1
      src/shapes.c
  5. +5
    -1
      src/text.c
  6. +5
    -1
      src/textures.c

+ 4
- 1
src/audio.c 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

+ 5
- 1
src/core.c 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.

+ 5
- 1
src/models.c 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()

+ 5
- 1
src/shapes.c 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()

+ 5
- 1
src/text.c 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()

+ 5
- 1
src/textures.c 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()

Loading…
Cancel
Save