summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_inline_modinfo.x
blob: a53de0a4a8653b504b8e8b676fb4e73277befe88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* EINA - EFL data type library
 * Copyright (C) 2016 Amitesh Singh
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library;
 * if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef EINA_INLINE_MODINFO_X_
#define EINA_INLINE_MODINFO_X_

#define __EINA_MODINFO_CONCAT(a, b) a##b
#define _EINA_MODINFO_CONCAT(a, b) __EINA_MODINFO_CONCAT(a, b)
#define __EINA_MODULE_UNIQUE_ID(id) _EINA_MODINFO_CONCAT(__EINA_MODULE_UNIQUE_ID_, id)

#define _EINA_MODINFO(name, info) \
  EAPI const char __EINA_MODULE_UNIQUE_ID(name)[] \
__attribute__((__used__)) __attribute__((unused, aligned(1))) = info;
#define EINA_MODINFO(tag, info) _EINA_MODINFO(tag, info)

/** 
  * @ingroup Eina_Module_Group
  *  
  * This macro is used for defining license.
  *
  */
#define EINA_MODULE_LICENSE(_license) EINA_MODINFO(license, _license)
/**
  * @ingroup Eina_Module_Group
  *  
  * This macro is used for defining author
  * Use "name <email>" or just "name"
  * for multiple authors, use multiple lines like below
    @code{.c}
           EINA_MODULE_AUTHOR("Author 1 <author1.email>\n"
                              "Author 2 <author2.email>");
    @endcode
  */
#define EINA_MODULE_AUTHOR(_author) EINA_MODINFO(author, _author)
/**
  * @ingroup Eina_Module_Group
  *  
  * This macro is used for defining version.
  */
#define EINA_MODULE_VERSION(_ver) EINA_MODINFO(ver, _ver)
/**
  * @ingroup Eina_Module_Group
  *  
  * This macro is used for defining description.
  * Explain what your module does.
  */
#define EINA_MODULE_DESCRIPTION(_desc) EINA_MODINFO(desc, _desc)

#endif