Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
gmi/iface/global.h
Go to the documentation of this file.
1/*
2This include-file determines the way the classes and functions in the
3library are exported when they are used as a dynamic or as application and static library.
4When building this Dynamic Library then _GMI_PKG (package) should be defined.
5
6_list of the declaration modifiers for types:
7 classes: _GMI_CLASS
8 Function: _GMI_FUNC
9 Data: _GMI_DATA
10
11Add compiler definition flags:
12 * _PAL_PKG when building a dynamic library (package)
13 * _PAL_ARC when including in a compile or using it as an archive.
14*/
15
16#pragma once
17
18// Import of defines for this target.
19#include <misc/gen/target.h>
20
21// When DL target and the PKG is not used the DL is being build.
22#if IS_DL_TARGET && defined(_GMI_PKG)
23 #define _GMI_DATA TARGET_EXPORT
24 #define _GMI_FUNC TARGET_EXPORT
25 #define _GMI_CLASS TARGET_EXPORT
26// Is used as an archive so no importing is needed.
27#elif defined(_GMI_ARC)
28 #define _GMI_DATA
29 #define _GMI_FUNC
30 #define _GMI_CLASS
31// When no flags are defined assume the package is imported.
32#else
33 #define _GMI_DATA TARGET_IMPORT
34 #define _GMI_FUNC TARGET_IMPORT
35 #define _GMI_CLASS TARGET_IMPORT
36#endif