Wallaroo  0.8
platform_specific_lib_macros.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * wallaroo - A library for configurable creation and wiring of C++ classes.
3  * Copyright (C) 2012 Daniele Pallastrelli
4  *
5  * This file is part of wallaroo.
6  * For more information, see http://wallaroolib.sourceforge.net/
7  *
8  * Boost Software License - Version 1.0 - August 17th, 2003
9  *
10  * Permission is hereby granted, free of charge, to any person or organization
11  * obtaining a copy of the software and accompanying documentation covered by
12  * this license (the "Software") to use, reproduce, display, distribute,
13  * execute, and transmit the Software, and to prepare derivative works of the
14  * Software, and to permit third-parties to whom the Software is furnished to
15  * do so, all subject to the following:
16  *
17  * The copyright notices in the Software and this entire statement, including
18  * the above license grant, this restriction and the following disclaimer,
19  * must be included in all copies of the Software, in whole or in part, and
20  * all derivative works of the Software, unless such copies or derivative
21  * works are solely in the form of machine-executable object code generated by
22  * a source language processor.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
27  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
28  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
29  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30  * DEALINGS IN THE SOFTWARE.
31  ******************************************************************************/
32 
33 #ifndef WALLAROO_DETAIL_PLATFORM_SPECIFIC_LIB_MACROS_H_
34 #define WALLAROO_DETAIL_PLATFORM_SPECIFIC_LIB_MACROS_H_
35 
36 
37 #if defined(__FreeBSD__)
38  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
39 #elif defined(_AIX) || defined(__TOS_AIX__)
40  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
41 #elif defined(hpux) || defined(_hpux)
42  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
43 #elif defined(__digital__) || defined(__osf__)
44  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
45 #elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__TOS_LINUX__)
46  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
47 #elif defined(__APPLE__) || defined(__TOS_MACOS__)
48  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
49 #elif defined(__NetBSD__)
50  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
51 #elif defined(__OpenBSD__)
52  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
53 #elif defined(sgi) || defined(__sgi)
54  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
55 #elif defined(sun) || defined(__sun)
56  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
57 #elif defined(__QNX__)
58  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
59 #elif defined(unix) || defined(__unix) || defined(__unix__)
60  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
61 #elif defined(_WIN32_WCE)
62  #define WALLAROO_DETAIL_OS_FAMILY_WINDOWS 1
63 #elif defined(_WIN32) || defined(_WIN64)
64  #define WALLAROO_DETAIL_OS_FAMILY_WINDOWS 1
65 #elif defined(__CYGWIN__)
66  #define WALLAROO_DETAIL_OS_FAMILY_UNIX 1
67 #else
68  #error "Unknown Platform."
69 #endif
70 
71 #if defined(WALLAROO_DETAIL_OS_FAMILY_WINDOWS)
72  #define WALLAROO_DLL_PREFIX extern "C" __declspec(dllexport)
73  #define WALLAROO_DLL_IMPL_HEADER "wallaroo/detail/dynamic_library_WIN32.h"
74 #elif defined(WALLAROO_DETAIL_OS_FAMILY_UNIX)
75  #define WALLAROO_DLL_PREFIX extern "C"
76  #define WALLAROO_DLL_IMPL_HEADER "wallaroo/detail/dynamic_library_UNIX.h"
77 #else
78  #error "Unknown Platform."
79 #endif
80 
81 #endif // WALLAROO_DETAIL_PLATFORM_SPECIFIC_LIB_MACROS_H_
82