BeBuild.h revision 133e4131
1/*
2 * Copyright 2007-2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _BE_BUILD_H
6#define _BE_BUILD_H
7
8
9#include <config_build/HaikuConfig.h>
10
11
12#define B_BEOS_VERSION_4				0x0400
13#define B_BEOS_VERSION_4_5				0x0450
14#define B_BEOS_VERSION_5				0x0500
15
16#define B_BEOS_VERSION					B_BEOS_VERSION_5
17#define B_BEOS_VERSION_MAUI				B_BEOS_VERSION_5
18
19/* Haiku (API) version */
20#define B_HAIKU_VERSION_BEOS			0x00000001
21#define B_HAIKU_VERSION_BONE			0x00000002
22#define B_HAIKU_VERSION_DANO			0x00000003
23#define B_HAIKU_VERSION_1_ALPHA_1		0x00000100
24#define B_HAIKU_VERSION_1_PRE_ALPHA_2	0x00000101
25#define B_HAIKU_VERSION_1				0x00010000
26
27#define B_HAIKU_VERSION					B_HAIKU_VERSION_1_PRE_ALPHA_2
28
29/* Haiku ABI */
30#define B_HAIKU_ABI_MAJOR				0xffff0000
31#define B_HAIKU_ABI_GCC_2				0x00020000
32#define B_HAIKU_ABI_GCC_4				0x00040000
33
34#define B_HAIKU_ABI_GCC_2_ANCIENT		0x00020000
35#define B_HAIKU_ABI_GCC_2_BEOS			0x00020001
36#define B_HAIKU_ABI_GCC_2_HAIKU			0x00020002
37
38#if __GNUC__ == 2
39#	define B_HAIKU_ABI					B_HAIKU_ABI_GCC_2_HAIKU
40#elif __GNUC__ >= 3 && __GNUC__ <= 8
41#	define B_HAIKU_ABI					B_HAIKU_ABI_GCC_4
42#else
43#	error Unsupported gcc version!
44#endif
45
46
47#define B_HAIKU_BITS					__HAIKU_ARCH_BITS
48#define B_HAIKU_PHYSICAL_BITS			__HAIKU_ARCH_PHYSICAL_BITS
49
50#ifdef __HAIKU_ARCH_64_BIT
51#	define B_HAIKU_64_BIT				1
52#else
53#	define B_HAIKU_32_BIT				1
54#endif
55
56#ifdef __HAIKU_ARCH_PHYSICAL_64_BIT
57#	define B_HAIKU_PHYSICAL_64_BIT		1
58#else
59#	define B_HAIKU_PHYSICAL_32_BIT		1
60#endif
61
62#ifdef __HAIKU_BEOS_COMPATIBLE
63#	define B_HAIKU_BEOS_COMPATIBLE		1
64#endif
65
66
67#define _UNUSED(argument) argument
68#define _PACKED __attribute__((packed))
69#define _PRINTFLIKE(_format_, _args_) \
70	__attribute__((format(__printf__, _format_, _args_)))
71#define _EXPORT
72#define _IMPORT
73
74#define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol)	\
75	__asm__(".symver " function "," versionedSymbol)
76
77
78#define _IMPEXP_ROOT
79#define _IMPEXP_BE
80
81
82#endif	/* _BE_BUILD_H */
83