sim_globals.h Source File

yasimavr: sim_globals.h Source File
yasimavr
Loading...
Searching...
No Matches
sim_globals.h
Go to the documentation of this file.
1/*
2 * sim_globals.h
3 *
4 * Copyright 2023-2024 Clement Savergne <csavergne@yahoo.com>
5
6 This file is part of yasim-avr.
7
8 yasim-avr is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 yasim-avr is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with yasim-avr. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22//=======================================================================================
23
24#ifndef __YASIMAVR_GLOBALS_H__
25#define __YASIMAVR_GLOBALS_H__
26
27
28#if defined _WIN32 || defined __CYGWIN__
29 #ifdef YASIMAVR_CORE_DLL
30 #ifdef __GNUC__
31 #define AVR_CORE_PUBLIC_API __attribute__ ((dllexport))
32 #else
33 #define AVR_CORE_PUBLIC_API __declspec(dllexport)
34 #endif
35 #else
36 #ifdef __GNUC__
37 #define AVR_CORE_PUBLIC_API __attribute__ ((dllimport))
38 #else
39 #define AVR_CORE_PUBLIC_API __declspec(dllimport)
40 #endif
41 #endif
42#else
43 #if __GNUC__ >= 4
44 #define AVR_CORE_PUBLIC_API __attribute__ ((visibility ("default")))
45 #else
46 #define AVR_CORE_PUBLIC_API
47 #endif
48#endif
49
50
51#ifdef YASIMAVR_NAMESPACE
52 #define YASIMAVR_BEGIN_NAMESPACE namespace YASIMAVR_NAMESPACE {
53 #define YASIMAVR_END_NAMESPACE };
54 #define YASIMAVR_USING_NAMESPACE using namespace YASIMAVR_NAMESPACE;
55 #define YASIMAVR_QUALIFIED_NAME(name) YASIMAVR_NAMESPACE::name
56 namespace YASIMAVR_NAMESPACE {}
57#else
58 #define YASIMAVR_BEGIN_NAMESPACE
59 #define YASIMAVR_END_NAMESPACE
60 #define YASIMAVR_USING_NAMESPACE
61 #define YASIMAVR_QUALIFIED_NAME(name) name
62#endif
63
64
66
67AVR_CORE_PUBLIC_API extern const unsigned long LIB_VERSION;
68AVR_CORE_PUBLIC_API extern const char* LIB_VERSION_STR;
69
71
72#endif //__YASIMAVR_GLOBALS_H__
YASIMAVR_BEGIN_NAMESPACE AVR_CORE_PUBLIC_API const unsigned long LIB_VERSION
Definition sim_globals.cpp:48
AVR_CORE_PUBLIC_API const char * LIB_VERSION_STR
Definition sim_globals.cpp:49
#define YASIMAVR_BEGIN_NAMESPACE
Definition sim_globals.h:58
#define AVR_CORE_PUBLIC_API
Definition sim_globals.h:46
#define YASIMAVR_END_NAMESPACE
Definition sim_globals.h:59