diff options
Diffstat (limited to 'source/base/base_include.h')
| -rw-r--r-- | source/base/base_include.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/source/base/base_include.h b/source/base/base_include.h new file mode 100644 index 0000000..9c928f2 --- /dev/null +++ b/source/base/base_include.h | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | #ifndef BASE_INCLUDE_H | ||
| 2 | #define BASE_INCLUDE_H | ||
| 3 | |||
| 4 | #if defined(__linux__) || defined(__APPLE__) | ||
| 5 | // #message "PLATFORM LINUX APPLE" | ||
| 6 | #define PLATFORM_UNIX 1 | ||
| 7 | #define PLATFORM_LINUX 1 | ||
| 8 | #elif defined(__linux__) && !defined(__APPLE__) | ||
| 9 | #message "PLATFORM LINUX" | ||
| 10 | #define PLATFORM_LINUX 1 | ||
| 11 | #elif defined(_WIN32) || defined(_WIN64) | ||
| 12 | #message "PLATFORM WINDOWS" | ||
| 13 | #define PLATFORM_WINDOWS 1 | ||
| 14 | #elif defined(__APPLE__) | ||
| 15 | #define PLATFORM_APPLE 1 | ||
| 16 | #message "PLATFORM APPLE" | ||
| 17 | #else | ||
| 18 | #message platform unknown | ||
| 19 | #endif // platform definitions | ||
| 20 | |||
| 21 | #if PLATFORM_UNIX | ||
| 22 | #include <unistd.h> | ||
| 23 | #include <dirent.h> | ||
| 24 | #include <sys/syscall.h> | ||
| 25 | #include <sys/mman.h> | ||
| 26 | #include <sys/socket.h> // needed for making a connection to displays (wayland) | ||
| 27 | #include <sys/stat.h> | ||
| 28 | #include <sys/types.h> | ||
| 29 | #include <sys/un.h> | ||
| 30 | #include <fcntl.h> | ||
| 31 | #include <dlfcn.h> | ||
| 32 | #if PLATFORM_LINUX | ||
| 33 | |||
| 34 | #if X11 | ||
| 35 | #include <X11/X.h> | ||
| 36 | #include <X11/Xlib.h> | ||
| 37 | #include <X11/keysym.h> | ||
| 38 | #elif WAYLAND | ||
| 39 | #include <wayland-client.h> | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #endif // PLATFORM_LINUX | ||
| 43 | #elif PLATFORM_WINDOWS | ||
| 44 | #define _WIN32_WINNT 0x0601 | ||
| 45 | #include <windows.h> | ||
| 46 | #endif // PLATFORM_UNIX - PLATFORM_WINDOWS | ||
| 47 | |||
| 48 | #if VULKAN | ||
| 49 | #include <vulkan/vulkan.h> | ||
| 50 | #elif OPENGL | ||
| 51 | ... | ||
| 52 | #endif | ||
| 53 | |||
| 54 | //- | ||
| 55 | |||
| 56 | #include <time.h> | ||
| 57 | #include <math.h> | ||
| 58 | #include <string.h> | ||
| 59 | #include <stdint.h> | ||
| 60 | #include <stddef.h> | ||
| 61 | #include <stdio.h> | ||
| 62 | #include <stdarg.h> | ||
| 63 | |||
| 64 | //- | ||
| 65 | #include "base_core.h" | ||
| 66 | #include "base_memory.h" | ||
| 67 | |||
| 68 | #include "base_arena.h" | ||
| 69 | #include "base_stack.h" | ||
| 70 | #include "base_string.h" | ||
| 71 | #include "base_platform.h" | ||
| 72 | #include "base_render.h" | ||
| 73 | |||
| 74 | #include "base_memory.cpp" | ||
| 75 | #include "base_arena.cpp" | ||
| 76 | #include "base_stack.cpp" | ||
| 77 | #include "base_string.cpp" | ||
| 78 | #include "base_platform.cpp" | ||
| 79 | |||
| 80 | #include "base_rand.cpp" | ||
| 81 | #include "base_simd.cpp" | ||
| 82 | |||
| 83 | #if VULKAN | ||
| 84 | |||
| 85 | #include "base_render_vulkan.cpp" | ||
| 86 | #endif | ||
| 87 | |||
| 88 | #endif // BASE_INCLUDE_H | ||
