]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMUSimulator/include/win64/fmilib_config.h
7d9861aad03af43ff3f8fb5c502efe57005f7fb6
[simantics/fmil.git] / org.simantics.fmil.core / native / FMUSimulator / include / win64 / fmilib_config.h
1 /*\r
2     Copyright (C) 2012 Modelon AB\r
3 \r
4     This program is free software: you can redistribute it and/or modify\r
5     it under the terms of the BSD style license.\r
6 \r
7      This program is distributed in the hope that it will be useful,\r
8     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
10     FMILIB_License.txt file for more details.\r
11 \r
12     You should have received a copy of the FMILIB_License.txt file\r
13     along with this program. If not, contact Modelon AB <http://www.modelon.com>.\r
14 */\r
15 \r
16 #ifndef CONFIG_FMILIB_H_\r
17 #define CONFIG_FMILIB_H_\r
18 \r
19 /** \file fmilib_config.h\r
20         \brief Library configuration file generated by the build system. \r
21 */\r
22 \r
23 #ifndef WIN32\r
24 #define WIN32\r
25 #ifdef WIN32\r
26 /** \def WIN32\r
27         \brief WIN32 is used to identify Windows OS (set on both Win32 and Win64) \r
28 */\r
29 #endif\r
30 #endif\r
31 \r
32 /* #undef MINGW */\r
33 #ifdef MINGW\r
34 /** \def MINGW\r
35         \brief MINGW is used to identify MSYS/MinGW environment \r
36 */\r
37 #endif\r
38 \r
39 #ifndef CMAKE_INTDIR\r
40 #define CMAKE_INTDIR "."\r
41 /** \def CMAKE_INTDIR\r
42         \brief The macro #CMAKE_INTDIR gives intermediate directory for the current configuration (Debug/Release). \r
43 \r
44 It is redefined to "." for Makefile based build environments. Otherwise is set by MSVC. */\r
45 #endif\r
46 \r
47 /** \brief Platform folder separator */\r
48 #define FMI_FILE_SEP "\\"       \r
49 \r
50 /** \brief DLL file name suffix(.so, .dll, ...) */\r
51 #define FMI_DLL_EXT ".dll" \r
52 \r
53 /** \brief Folder name inside FMU in which the DLL is found for this platform */\r
54 #define FMI_PLATFORM "win64"\r
55 \r
56 /** \brief Folder name inside FMU where binaries are */\r
57 #define FMI_BINARIES "binaries"\r
58 /** \brief Model description XML file name */\r
59 #define FMI_MODEL_DESCRIPTION_XML "modelDescription.xml"\r
60 \r
61 /* #undef FMILIB_STATIC_LIB_ONLY */\r
62 #ifdef FMILIB_STATIC_LIB_ONLY\r
63 /** \r
64 \def FMILIB_STATIC_LIB_ONLY\r
65 \brief The macro #FMILIB_STATIC_LIB_ONLY is defined if no fmilib_shared is build. */\r
66 #endif\r
67 \r
68 #ifndef FMILIB_STATIC_LIB_ONLY\r
69  #if defined WIN32\r
70   #ifdef FMILIB_BUILDING_LIBRARY\r
71     #if 0 /* defined(__GNUC__)  MSYS currently does not support visibility attribute */ \r
72       #define FMILIB_EXPORT __attribute__ ((dllexport))\r
73     #else\r
74                 /* Note: actually gcc seems to also supports this syntax. */\r
75       #define FMILIB_EXPORT __declspec(dllexport) \r
76     #endif\r
77   #else\r
78     #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute  */\r
79       #define FMILIB_EXPORT __attribute__ ((dllimport))\r
80     #else\r
81                 /* Note: actually gcc seems to also supports this syntax. */\r
82       #define FMILIB_EXPORT __declspec(dllimport)\r
83     #endif\r
84   #endif\r
85   #define FMILIB_PRIVATE\r
86  #else\r
87   #if __GNUC__ >= 4\r
88     #define FMILIB_EXPORT __attribute__ ((visibility ("default")))\r
89     #define FMILIB_PRIVATE  __attribute__ ((visibility ("hidden")))\r
90   #else\r
91     #define FMILIB_EXPORT\r
92     #define FMILIB_PRIVATE\r
93   #endif\r
94  #endif\r
95 #else\r
96   #if __GNUC__ >= 4\r
97     #define FMILIB_EXPORT __attribute__ ((visibility ("default")))\r
98     #define FMILIB_PRIVATE  __attribute__ ((visibility ("hidden")))\r
99   #else\r
100     #define FMILIB_EXPORT\r
101     #define FMILIB_PRIVATE\r
102   #endif\r
103 #endif\r
104 \r
105 /** \def FMILIB_EXPORT\r
106         \brief Used to declare the public API of the library needed for dynamic linking. \r
107         \def FMILIB_PRIVATE\r
108         \brief Intended for declaration of the private library functions.\r
109 */\r
110 \r
111 /* #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG */\r
112 #ifndef FMILIB_ENABLE_LOG_LEVEL_DEBUG\r
113 /* Just for doxygen */\r
114 #define FMILIB_ENABLE_LOG_LEVEL_DEBUG\r
115 #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG\r
116 #endif\r
117 /** \r
118 \def FMILIB_ENABLE_LOG_LEVEL_DEBUG\r
119 \brief Activates debug level log messages. If not defined the debug messages are compiled out. \r
120 */\r
121 \r
122 #if defined _MSC_VER\r
123         #define FMILIB_SIZET_FORMAT "%Iu"\r
124 #else \r
125         #define FMILIB_SIZET_FORMAT "%zu"\r
126 #endif\r
127 \r
128 /* #undef FMILIB_GENERATE_BUILD_STAMP */\r
129 #ifndef FMILIB_GENERATE_BUILD_STAMP\r
130 /* Just for Doxygen */\r
131 #define FMILIB_GENERATE_BUILD_STAMP\r
132 #undef FMILIB_GENERATE_BUILD_STAMP\r
133 #endif\r
134 /** \r
135 \def FMILIB_GENERATE_BUILD_STAMP\r
136 \brief Generate build-stamp file and enable fmilib_get_build_stamp(). \r
137 */\r
138 \r
139 #ifdef FMILIB_GENERATE_BUILD_STAMP\r
140 #ifdef __cplusplus\r
141 extern "C" {\r
142 #endif\r
143 \r
144 /** \brief Get the library build stamp. \r
145         \return A string giving SVN revision and build time for the library.\r
146         \r
147         The function is only active if the library was configured with #FMILIB_GENERATE_BUILD_STAMP ON\r
148 */\r
149 FMILIB_EXPORT const char* fmilib_get_build_stamp(void);\r
150 #ifdef __cplusplus\r
151 }\r
152 #endif\r
153 #endif\r
154 \r
155 #define HAVE_VA_COPY\r
156 /* #undef HAVE___VA_COPY */\r
157 \r
158 #define HAVE_VSNPRINTF\r
159 #ifdef HAVE_VSNPRINTF\r
160 #define jm_rpl_vsnprintf vsnprintf\r
161 #endif\r
162 \r
163 #endif\r