2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // platform.h: Operating system specific includes and defines.
9 #ifndef COMMON_PLATFORM_H_
10 #define COMMON_PLATFORM_H_
12 #if defined(_WIN32) || defined(_WIN64)
13 # define ANGLE_PLATFORM_WINDOWS 1
14 #elif defined(__APPLE__)
15 # define ANGLE_PLATFORM_APPLE 1
16 # define ANGLE_PLATFORM_POSIX 1
17 #elif defined(__linux__)
18 # define ANGLE_PLATFORM_LINUX 1
19 # define ANGLE_PLATFORM_POSIX 1
20 #elif defined(ANDROID)
21 # define ANGLE_PLATFORM_ANDROID 1
22 # define ANGLE_PLATFORM_POSIX 1
23 #elif defined(__FreeBSD__) || \
24 defined(__OpenBSD__) || \
25 defined(__NetBSD__) || \
26 defined(__DragonFly__) || \
28 defined(__GLIBC__) || \
31 # define ANGLE_PLATFORM_POSIX 1
33 # error Unsupported platform.
36 #ifdef ANGLE_PLATFORM_WINDOWS
37 # if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP
38 # define ANGLE_ENABLE_WINDOWS_STORE 1
43 # ifndef WIN32_LEAN_AND_MEAN
44 # define WIN32_LEAN_AND_MEAN 1
53 # if defined(ANGLE_ENABLE_D3D9)
55 # include <d3dcompiler.h>
58 # if defined(ANGLE_ENABLE_D3D11)
64 # include <d3dcompiler.h>
67 # if defined(ANGLE_ENABLE_WINDOWS_STORE)
70 # include <DXProgrammableCapture.h>
71 # include <dxgidebug.h>
79 #endif // COMMON_PLATFORM_H_