arch_avr_globals.h Source File

yasimavr: arch_avr_globals.h Source File
yasimavr
Loading...
Searching...
No Matches
arch_avr_globals.h
Go to the documentation of this file.
1/*
2 * arch_avr_globals.h
3 *
4 * Copyright 2023 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_AVR_GLOBALS_H__
25#define __YASIMAVR_AVR_GLOBALS_H__
26
27
28#if defined _WIN32
29 #ifdef YASIMAVR_AVR_DLL
30 #ifdef __GNUC__
31 #define AVR_ARCHAVR_PUBLIC_API __attribute__ ((dllexport))
32 #else
33 #define AVR_ARCHAVR_PUBLIC_API __declspec(dllexport)
34 #endif
35 #else
36 #ifdef __GNUC__
37 #define AVR_ARCHAVR_PUBLIC_API __attribute__ ((dllimport))
38 #else
39 #define AVR_ARCHAVR_PUBLIC_API __declspec(dllimport)
40 #endif
41 #endif
42#else
43 #if __GNUC__ >= 4
44 #define AVR_ARCHAVR_PUBLIC_API __attribute__ ((visibility ("default")))
45 #else
46 #define AVR_ARCHAVR_PUBLIC_API
47 #endif
48#endif
49
50
51#endif //__YASIMAVR_AVR_GLOBALS_H__