Add submodules to Makefile and clean up some imports
This commit is contained in:
parent
205b9e171e
commit
7af660d6e6
15
src/Makefile
15
src/Makefile
|
|
@ -632,8 +632,19 @@ endif
|
||||||
# Compile all modules with their prerequisites
|
# Compile all modules with their prerequisites
|
||||||
|
|
||||||
# Compile core module
|
# Compile core module
|
||||||
rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h
|
RCORE_SUBMODULE=rcore_desktop.c
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
ifeq ($(PLATFORM),PLATFORM_ANDROID)
|
||||||
|
RCORE_SUBMODULE=rcore_android.c
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
RCORE_SUBMODULE=rcore_drm.c
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
|
RCORE_SUBMODULE=rcore_web.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h rcore.h
|
||||||
|
$(CC) -c $< $(RCORE_SUBMODULE) $(CFLAGS) $(INCLUDE_PATHS)
|
||||||
|
|
||||||
# Compile rglfw module
|
# Compile rglfw module
|
||||||
rglfw.o : rglfw.c
|
rglfw.o : rglfw.c
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,6 @@
|
||||||
#include "config.h" // Defines module configuration flags
|
#include "config.h" // Defines module configuration flags
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "utils.h" // Required for: TRACELOG() macros
|
|
||||||
|
|
||||||
#define RLGL_IMPLEMENTATION
|
#define RLGL_IMPLEMENTATION
|
||||||
#include "rlgl.h" // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
#include "rlgl.h" // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
||||||
|
|
||||||
|
|
@ -167,12 +165,6 @@
|
||||||
#endif // OSs
|
#endif // OSs
|
||||||
#endif // PLATFORM_DESKTOP
|
#endif // PLATFORM_DESKTOP
|
||||||
|
|
||||||
#include <stdlib.h> // Required for: srand(), rand(), atexit()
|
|
||||||
#include <stdio.h> // Required for: sprintf() [Used in OpenURL()]
|
|
||||||
#include <string.h> // Required for: strrchr(), strcmp(), strlen(), memset()
|
|
||||||
#include <time.h> // Required for: time() [Used in InitTimer()]
|
|
||||||
#include <math.h> // Required for: tan() [Used in BeginMode3D()], atan2f() [Used in LoadVrStereoConfig()]
|
|
||||||
|
|
||||||
#define _CRT_INTERNAL_NONSTDC_NAMES 1
|
#define _CRT_INTERNAL_NONSTDC_NAMES 1
|
||||||
#include <sys/stat.h> // Required for: stat(), S_ISREG [Used in GetFileModTime(), IsFilePath()]
|
#include <sys/stat.h> // Required for: stat(), S_ISREG [Used in GetFileModTime(), IsFilePath()]
|
||||||
|
|
||||||
|
|
|
||||||
26
src/rcore.h
26
src/rcore.h
|
|
@ -1,6 +1,22 @@
|
||||||
#ifndef RCORE_H
|
#ifndef RCORE_H
|
||||||
#define RCORE_H
|
#define RCORE_H
|
||||||
|
|
||||||
|
#include <stdlib.h> // Required for: srand(), rand(), atexit()
|
||||||
|
#include <stdio.h> // Required for: sprintf() [Used in OpenURL()]
|
||||||
|
#include <string.h> // Required for: strrchr(), strcmp(), strlen(), memset()
|
||||||
|
#include <time.h> // Required for: time() [Used in InitTimer()]
|
||||||
|
#include <math.h> // Required for: tan() [Used in BeginMode3D()], atan2f() [Used in LoadVrStereoConfig()]
|
||||||
|
|
||||||
|
#include "utils.h" // Required for: TRACELOG() macros
|
||||||
|
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
#define GLFW_INCLUDE_NONE // Disable the standard OpenGL header inclusion on GLFW3
|
||||||
|
// NOTE: Already provided by rlgl implementation (on glad.h)
|
||||||
|
#include "GLFW/glfw3.h" // GLFW3 library: Windows, OpenGL context and Input management
|
||||||
|
// NOTE: GLFW3 already includes gl.h (OpenGL) headers
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// PROVIDE A HEADER TO BE USED BY ALL THE rcore_* IMPLEMENTATIONS.
|
// PROVIDE A HEADER TO BE USED BY ALL THE rcore_* IMPLEMENTATIONS.
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
@ -117,6 +133,16 @@ typedef struct CoreData {
|
||||||
char **dropFilepaths; // Store dropped files paths pointers (provided by GLFW)
|
char **dropFilepaths; // Store dropped files paths pointers (provided by GLFW)
|
||||||
unsigned int dropFileCount; // Count dropped files strings
|
unsigned int dropFileCount; // Count dropped files strings
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float width;
|
||||||
|
float height;
|
||||||
|
} windowMin;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
float width;
|
||||||
|
float height;
|
||||||
|
} windowMax;
|
||||||
|
|
||||||
} Window;
|
} Window;
|
||||||
#if defined(PLATFORM_ANDROID)
|
#if defined(PLATFORM_ANDROID)
|
||||||
struct {
|
struct {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user