Orocos Real-Time Toolkit  2.8.3
rtt-config.h
Go to the documentation of this file.
1 #ifndef RTT_CONFIG_H
2 #define RTT_CONFIG_H
3 
4 #define RTT_VERSION 2.8.3
5 #define RTT_VERSION_MAJOR 2
6 #define RTT_VERSION_MINOR 8
7 #define RTT_VERSION_PATCH 3
8 
9 #define RTT_VERSION_GTE(major,minor,patch) \
10  ((RTT_VERSION_MAJOR > major) || (RTT_VERSION_MAJOR == major && \
11  (RTT_VERSION_MINOR > minor) || (RTT_VERSION_MINOR == minor && \
12  (RTT_VERSION_PATCH >= patch))))
13 
14 /* #undef ORO_DISABLE_PORT_DATA_SCRIPTING */
15 
16 // if not defined, show an error
17 #ifndef OROCOS_TARGET
18 // OROCOS_TARGET is only used to include the file targets/OROCOS_TARGET
19 #error "You _must_ define OROCOS_TARGET to an installed target (for example: -DOROCOS_TARGET=gnulinux )"
20 #endif
21 
22 #include "os/targets/rtt-target.h"
23 
24 // Detect the CPU we are compiling for
25 #if defined( __GNUC__ )
26 #define OROBLD_GCC_VERSION (__GNUC__ * 10000 \
27  + __GNUC_MINOR__ * 100 \
28  + __GNUC_PATCHLEVEL__)
29 #endif
30 # if defined( __GNUC__ ) && defined( __i386__ )
31 # define OROBLD_OS_ARCH_i386
32 # elif defined( __GNUC__ ) && defined( __x86_64__ )
33 # define OROBLD_OS_ARCH_x86_64
34 # elif defined( __GNUC__ ) && (defined( __powerpc__ ) || defined( __PPC__ ) )
35 # define OROBLD_OS_ARCH_ppc
36 # elif defined( __GNUC__ ) && (defined( __arm__ ) || defined( __ARM__ ) )
37 # define OROBLD_OS_ARCH_arm
38 # elif defined( __GNUC__ ) && (defined( __aarch64__ ) || defined( __AARCH64__ ) )
39 # define OROBLD_OS_ARCH_aarch64
40 # elif defined( __GNUC__ ) && defined( __ia64__ )
41 # error "ia64 Is not yet supported, contact the orocos-dev mailinglist for further actions."
42 # define OROBLD_OS_ARCH_ia64
43 # elif defined( __MINGW32__ ) && defined( __i386__ )
44 # define OROBLD_OS_ARCH_i386
45 # elif defined( WIN32 )
46 # define OROBLD_OS_ARCH_i386
47 # else
48 # error "Unknown Processor Architecture"
49 # define OROBLD_OS_ARCH_unknown
50 # endif
51 
52 
53 //
54 // See: <http://gcc.gnu.org/wiki/Visibility>
55 //
56 #define RTT_GCC_HASVISIBILITY
57 #if defined(__GNUG__) && defined(RTT_GCC_HASVISIBILITY) && (defined(__unix__) || defined(__APPLE__))
58 
59 # if defined(RTT_DLL_EXPORT)
60  // Use RTT_API for normal function exporting
61 # define RTT_API __attribute__((visibility("default")))
62 
63  // Use RTT_EXPORT for static template class member variables
64  // They must always be 'globally' visible.
65 # define RTT_EXPORT __attribute__((visibility("default")))
66 
67  // Use RTT_HIDE to explicitly hide a symbol
68 # define RTT_HIDE __attribute__((visibility("hidden")))
69 
70 # define RTT_EXT_IMPL extern
71 
72 # else
73 # define RTT_API
74 # define RTT_EXPORT __attribute__((visibility("default")))
75 # define RTT_HIDE __attribute__((visibility("hidden")))
76 # define RTT_EXT_IMPL extern
77 # endif
78 #else
79  // Win32 and NOT GNU
80 # if defined( WIN32 ) && !defined ( __MINGW32__ )
81 # if defined(RTT_STATIC)
82 # define RTT_API
83 # define RTT_EXPORT
84 # define RTT_HIDE
85 # elif defined(RTT_DLL_EXPORT)
86 # define RTT_API __declspec(dllexport)
87 # define RTT_EXPORT __declspec(dllexport)
88 # define RTT_HIDE
89 # define RTT_EXT_IMPL extern
90 # else
91 # define RTT_API __declspec(dllimport)
92 # define RTT_EXPORT __declspec(dllexport)
93 # define RTT_HIDE
94 # define RTT_EXT_IMPL extern
95 # endif
96 # else
97 # define RTT_API
98 # define RTT_EXPORT
99 # define RTT_HIDE
100 # define RTT_EXT_IMPL
101 # endif
102 #endif
103 
104 #endif