Files
core_zero/tjp/core/system/System.h
Timothy Prepscius 996151a56a flatten 20260225
2026-02-25 12:43:06 -05:00

55 lines
1.2 KiB
C

// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#pragma once
#if !defined(SYS_LINUX) && !defined(SYS_WINDOWS) && !defined(SYS_IOS) && !defined(SYS_ANDROID)
#ifdef __llvm__
#define COMPILER_LLVM
#elif defined __GNUC__
#define COMPILER_GCC
#endif
#ifdef _WIN32
//define something for Windows (32-bit and 64-bit, this part is common)
#ifdef _WIN64
#define SYS_WINDOWS
//define something for Windows (64-bit only)
#else
#define SYS_WINDOWS
//define something for Windows (32-bit only)
#endif
#elif __APPLE__
#define SYS_APPLE
#include "TargetConditionals.h"
#if TARGET_IPHONE_SIMULATOR
#define SYS_IOS
#define SYS_IOS_SIMULATOR
// iOS Simulator
#elif TARGET_OS_IPHONE
#define SYS_IOS
// iOS device
#elif TARGET_OS_MAC
#define SYS_MAC
// Other kinds of Mac OS
#else
# error "Unknown Apple platform"
#endif
#elif __linux__
#define SYS_LINUX
// linux
#elif __unix__ // all unices not caught above
#define SYS_LINUX
// Unix
#elif defined(_POSIX_VERSION)
#define SYS_LINUX
// POSIX
#else
# error "Unknown system"
#endif
#endif