rig_dll.h

00001 /* $Id: rig_dll.h,v 1.10 2006/10/13 12:02:36 aa6e Exp $ */
00002 
00003 /*
00004  * Provide definitions to compile in Windows
00005  * using C-friendly options, e.g.
00006  *
00007  * HAMLIB_API -> __cdecl
00008  * HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport)
00009  * BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport)
00010  *
00011  * No effect in non-Windows environments.
00012  */
00013 
00014 /*
00015  * Temporarily commented out, until cygwin port is sorted out
00016  */
00017 #if 0
00018 
00019 #if defined(__CYGWIN__) || defined(_WIN32)
00020 #  if defined(HAMLIB_DLL)
00021 #    if defined(HAMLIB_STATIC)
00022 #      undef HAMLIB_STATIC
00023 #    endif
00024 #    if defined(ALL_STATIC)
00025 #      undef ALL_STATIC
00026 #    endif
00027 #  endif
00028 #  undef HAMLIB_IMPEXP
00029 #  undef BACKEND_IMPEXP
00030 #  undef HAMLIB_API
00031 #  undef HAMLIB_EXPORT
00032 #  undef HAMLIB_EXPORT_VAR
00033 #  if defined(HAMLIB_DLL) && defined(IN_HAMLIB)
00034 /* building a DLL */
00035 #    define HAMLIB_IMPEXP __declspec(dllexport)
00036 #    define BACKEND_IMPEXP __declspec(dllexport)
00037 #  elif defined(HAMLIB_STATIC) || defined(ALL_STATIC)
00038 /* building or linking to a static library */
00039 #    define HAMLIB_IMPEXP
00040 #    define BACKEND_IMPEXP
00041 #  else
00042 /* linking to the DLL */
00043 #    define HAMLIB_IMPEXP  __declspec(dllimport)
00044 #    define BACKEND_IMPEXP __declspec(dllexport)
00045 #  endif
00046 #  define HAMLIB_API __cdecl
00047 #  define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
00048 #  define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
00049 #  define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API
00050 #  define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
00051 #endif
00052 
00053 #endif
00054 
00055 
00056 #if defined(_WIN32) && !defined(__CYGWIN__)
00057 #  undef HAMLIB_IMPEXP
00058 #  undef BACKEND_IMPEXP
00059 #  undef HAMLIB_API
00060 #  undef HAMLIB_EXPORT
00061 #  undef HAMLIB_EXPORT_VAR
00062 #  undef BACKEND_EXPORT
00063 #  undef BACKEND_EXPORT_VAR
00064 #  ifdef DLL_EXPORT
00065 #    define HAMLIB_API __cdecl
00066 #    ifdef IN_HAMLIB
00067 #      define BACKEND_IMPEXP __declspec(dllexport)
00068 #      define HAMLIB_IMPEXP __declspec(dllexport)
00069 #    else
00070 #      define BACKEND_IMPEXP __declspec(dllexport)
00071 #      define HAMLIB_IMPEXP __declspec(dllimport)
00072 #    endif
00073 #  else
00074 #      define HAMLIB_IMPEXP __declspec(dllimport)
00075          /* must be static build, no directive? */
00076 #  endif
00077 #endif
00078 
00079 
00080 /* Take care of non-cygwin platforms */
00081 #if !defined(HAMLIB_IMPEXP)
00082 #  define HAMLIB_IMPEXP
00083 #endif
00084 #if !defined(BACKEND_IMPEXP)
00085 #  define BACKEND_IMPEXP
00086 #endif
00087 #if !defined(HAMLIB_API)
00088 #  define HAMLIB_API
00089 #endif
00090 #if !defined(HAMLIB_EXPORT)
00091 #  define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
00092 #endif
00093 #if !defined(HAMLIB_EXPORT_VAR)
00094 #  define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
00095 #endif
00096 #if !defined(BACKEND_EXPORT)
00097 #  define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API
00098 #endif
00099 #if !defined(BACKEND_EXPORT_VAR)
00100 #  define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
00101 #endif
00102 
00103 

Generated on Thu May 24 22:52:14 2007 for Hamlib by  doxygen 1.5.2