#ifndef BASE_INCLUDE_H #define BASE_INCLUDE_H #if defined(__APPLE__) #define PLATFORM_APPLE 1 #define PLATFORM_UNIX 1 #elif defined(__linux__) #define PLATFORM_LINUX 1 #define PLATFORM_UNIX 1 #elif defined(_WIN32) #define PLATFORM_WINDOWS 1 #else #error Unsupported platform #endif // platform definitions #ifndef PLATFORM_APPLE #define PLATFORM_APPLE 0 #endif #ifndef PLATFORM_LINUX #define PLATFORM_LINUX 0 #endif #ifndef PLATFORM_UNIX #define PLATFORM_UNIX 0 #endif #ifndef PLATFORM_WINDOWS #define PLATFORM_WINDOWS 0 #endif #ifndef DEBUG #define DEBUG 0 #endif #ifndef X11 #define X11 0 #endif #ifndef WAYLAND #define WAYLAND 0 #endif #ifndef VULKAN #define VULKAN 0 #endif #ifndef OPENGL #define OPENGL 0 #endif #if PLATFORM_UNIX #include #include #include #include // needed for making a connection to displays (wayland) #include #include #include #include #if PLATFORM_LINUX #include #if X11 #include #include #include #elif WAYLAND #include // wl_display, wl_surface, wl_seat, wl_keyboard, ... (core protocol) #include "xdg-shell-client-protocol.h" // xdg_wm_base, xdg_surface, xdg_toplevel (generated by build.sh) #include // the only types of inputs the server will probably send on wayland #endif #endif // PLATFORM_LINUX #elif PLATFORM_WINDOWS #define _WIN32_WINNT 0x0601 #include #endif // PLATFORM_UNIX - PLATFORM_WINDOWS #if VULKAN // #include #elif OPENGL ... #endif //- #include #include #include #include #include #include //- #include "base_core.h" #include "base_memory.h" #include "base_arena.h" #include "base_stack.h" #include "base_string.h" #include "base_platform.h" #include "base_render.h" #include "base_memory.cpp" #include "base_arena.cpp" #include "base_stack.cpp" #include "base_string.cpp" #if PLATFORM_LINUX #include "base_platform_linux.cpp" #elif PLATFORM_WINDOWS #include "base_platform_win32.cpp" #endif #include "base_rand.cpp" #include "base_simd.cpp" #if VULKAN #include "base_render_vulkan.cpp" #endif #endif // BASE_INCLUDE_H