00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00029 #ifndef LINKAGE_H
00030 #define LINKAGE_H
00031
00032 #include <GenICamVersion.h>
00033
00034 #if defined (_MSC_VER)
00035
00036 # if defined (_WIN32) && defined (_MT )
00037 # if defined(GENICAM_USER_ALWAYS_LINK_RELEASE)
00038
00039 # define CONFIGURATION "MD"
00040 # else
00041 # if defined(_DEBUG) || defined(DEBUG)
00042 # define CONFIGURATION "MDd"
00043 # else
00044 # define CONFIGURATION "MD"
00045 # endif
00046 # endif // defined(GENICAM_USER_ALWAYS_LINK_RELEASE)
00047 # else
00048 # error Invalid configuration
00049 # endif
00050
00051 # if defined(COMPILER) // COMPILER may be force set from outside
00052 # undef GENICAM_COMPILER_STR
00053 # define GENICAM_COMPILER_STR COMPILER
00054 # endif
00055
00056
00057
00058
00059
00060
00061
00062 # if !( _MSC_VER==1400 || _MSC_VER==1500 || _MSC_VER==1600 || _MSC_VER==1700 || _MSC_VER==1800 || _MSC_VER==1900 ) && ! defined(GENICAM_USER_ACCEPTS_ANY_COMPILER)
00063 # define COMPILER_VERSION_2( s ) #s
00064 # define COMPILER_VERSION_STRING(version) COMPILER_VERSION_2( version )
00065 # pragma message( "Notice: Using GenICam with untested compiler, version " COMPILER_VERSION_STRING(_MSC_VER) " detected!" )
00066 # pragma message( "Following versions were tested: 1400, 1500, 1600, 1700, 1800, 1900." )
00067 # undef COMPILER_VERSION_2
00068 # undef COMPILER_VERSION_STRING
00069 # endif
00070
00071 # if defined(GENICAM_COMPANY_SUFFIX)
00072 # define GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
00073 "_" CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "_" TOSTRING(GENICAM_COMPANY_SUFFIX) "." EXTENSION
00074 # else
00075 # define GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
00076 "_" CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "." EXTENSION
00077 # endif
00078
00079
00080
00081
00082
00083 # define LIB_SUFFIX \
00084 GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "lib" )
00085 #if defined(UNDER_RTSS)
00086 # define DLL_SUFFIX \
00087 GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "rtdll" )
00088 #else
00089 # define DLL_SUFFIX \
00090 GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "dll" )
00091 #endif // defined(UNDER_RTSS)
00092 # define EXE_SUFFIX \
00093 GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "exe" )
00094
00095 # define DLL_PREFIX ""
00096
00097 #elif defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS))
00098
00099 # if defined(_DEBUG) || defined(DEBUG)
00100 # define CONFIGURATION "_d"
00101 # else
00102 # define CONFIGURATION ""
00103 # endif
00104
00105 # if defined(GENICAM_COMPANY_SUFFIX)
00106 # define GENICAM_SUFFIX( CONFIGURATION, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
00107 CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "_" TOSTRING(GENICAM_COMPANY_SUFFIX) "." EXTENSION
00108 # else
00109 # define GENICAM_SUFFIX( CONFIGURATION, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
00110 CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "." EXTENSION
00111 # endif
00112
00113
00114
00115
00116
00117
00118 # define LIB_SUFFIX \
00119 GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "a" )
00120
00121 # if defined(__linux__)
00122 # define DLL_SUFFIX \
00123 GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "so" )
00124 # elif defined(VXWORKS)
00125 # define DLL_SUFFIX \
00126 GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "out" )
00127 # else
00128 # define DLL_SUFFIX \
00129 GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "dylib" )
00130 # endif
00131
00132 # define EXE_SUFFIX \
00133 GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "" )
00134
00135 # if defined(VXWORKS)
00136 # define DLL_PREFIX ""
00137 # else
00138 # define DLL_PREFIX "lib"
00139 # endif
00140
00141 #else
00142
00143 # error Unknown shared library support
00144
00145 #endif
00146
00147 #define LIB_NAME( MODULE ) \
00148 MODULE LIB_SUFFIX
00149
00150 #define DLL_NAME( MODULE ) \
00151 DLL_PREFIX MODULE DLL_SUFFIX
00152
00153 #define EXE_NAME( MODULE ) \
00154 MODULE EXE_SUFFIX
00155
00156
00157
00158 #if defined(_DEBUG) || defined(DEBUG)
00159 # define CAMERALINK_CONFIGURATION "d"
00160 #else
00161 # define CAMERALINK_CONFIGURATION ""
00162 #endif
00163 #
00164 #if defined(_MSC_VER)
00165 # if defined(UNDER_RTSS)
00166 # define CAMERALINK_DLL_SUFFIX ".rtdll"
00167 # else
00168 # define CAMERALINK_DLL_SUFFIX ".dll"
00169 # endif
00170 #elif defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS))
00171 # if defined(__linux__)
00172 # define CAMERALINK_DLL_SUFFIX ".so"
00173 # elif defined(VXWORKS)
00174 # define CAMERALINK_DLL_SUFFIX ".out"
00175 # else
00176 # define CAMERALINK_DLL_SUFFIX ".dylib"
00177 # endif
00178 #endif
00179 #
00180 #define CAMERALINK_DLL_NAME( MODULE) \
00181 MODULE CAMERALINK_CONFIGURATION CAMERALINK_DLL_SUFFIX
00182
00183 #endif // LINKAGE_H