2003-04-16 22:33:18 +00:00
|
|
|
/* $Id: rig_dll.h,v 1.7 2003-04-16 22:33:18 fillods Exp $ */
|
2001-06-12 23:59:21 +00:00
|
|
|
|
|
|
|
|
2001-12-19 03:37:07 +00:00
|
|
|
/*
|
|
|
|
* Temporarily commented out, until cygwin port is sorted out
|
|
|
|
*/
|
|
|
|
#if 0
|
|
|
|
|
2001-06-12 23:59:21 +00:00
|
|
|
#if defined(__CYGWIN__)
|
|
|
|
# if defined(HAMLIB_DLL)
|
|
|
|
# if defined(HAMLIB_STATIC)
|
|
|
|
# undef HAMLIB_STATIC
|
|
|
|
# endif
|
2001-06-15 06:59:47 +00:00
|
|
|
# if defined(ALL_STATIC)
|
|
|
|
# undef ALL_STATIC
|
|
|
|
# endif
|
2001-06-12 23:59:21 +00:00
|
|
|
# endif
|
|
|
|
# undef HAMLIB_IMPEXP
|
2001-12-16 11:14:47 +00:00
|
|
|
# undef BACKEND_IMPEXP
|
2001-06-12 23:59:21 +00:00
|
|
|
# undef HAMLIB_API
|
2002-11-14 19:27:35 +00:00
|
|
|
# undef HAMLIB_EXPORT
|
|
|
|
# undef HAMLIB_EXPORT_VAR
|
2001-12-16 11:14:47 +00:00
|
|
|
# if defined(HAMLIB_DLL) && defined(IN_HAMLIB)
|
2001-06-12 23:59:21 +00:00
|
|
|
/* building a DLL */
|
|
|
|
# define HAMLIB_IMPEXP __declspec(dllexport)
|
2001-12-16 11:14:47 +00:00
|
|
|
# define BACKEND_IMPEXP __declspec(dllexport)
|
2001-06-15 06:59:47 +00:00
|
|
|
# elif defined(HAMLIB_STATIC) || defined(ALL_STATIC)
|
2001-06-12 23:59:21 +00:00
|
|
|
/* building or linking to a static library */
|
2001-06-15 06:59:47 +00:00
|
|
|
# define HAMLIB_IMPEXP
|
2001-12-16 11:14:47 +00:00
|
|
|
# define BACKEND_IMPEXP
|
2001-06-12 23:59:21 +00:00
|
|
|
# else
|
|
|
|
/* linking to the DLL */
|
2001-12-16 11:14:47 +00:00
|
|
|
# define HAMLIB_IMPEXP __declspec(dllimport)
|
|
|
|
# define BACKEND_IMPEXP __declspec(dllexport)
|
2001-06-12 23:59:21 +00:00
|
|
|
# endif
|
|
|
|
# define HAMLIB_API __cdecl
|
|
|
|
# define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
|
|
|
|
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
|
2001-12-16 11:14:47 +00:00
|
|
|
# define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API
|
|
|
|
# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
|
2001-06-12 23:59:21 +00:00
|
|
|
#endif
|
|
|
|
|
2001-12-19 03:37:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__CYGWIN__)
|
2003-04-16 22:33:18 +00:00
|
|
|
# undef HAMLIB_IMPEXP
|
|
|
|
# undef BACKEND_IMPEXP
|
|
|
|
# undef HAMLIB_API
|
|
|
|
# undef HAMLIB_EXPORT
|
2002-11-14 19:27:35 +00:00
|
|
|
# undef HAMLIB_EXPORT_VAR
|
2003-04-16 22:33:18 +00:00
|
|
|
# undef BACKEND_EXPORT
|
|
|
|
# undef BACKEND_EXPORT_VAR
|
2001-12-19 03:37:07 +00:00
|
|
|
# ifdef DLL_EXPORT
|
2003-04-16 22:33:18 +00:00
|
|
|
# define HAMLIB_API __cdecl
|
2001-12-19 03:37:07 +00:00
|
|
|
# ifdef IN_HAMLIB
|
2003-04-16 22:33:18 +00:00
|
|
|
# define BACKEND_IMPEXP __declspec(dllexport)
|
|
|
|
# define HAMLIB_IMPEXP __declspec(dllexport)
|
2001-12-19 03:37:07 +00:00
|
|
|
# else
|
2003-04-16 22:33:18 +00:00
|
|
|
# define BACKEND_IMPEXP __declspec(dllexport)
|
|
|
|
# define HAMLIB_IMPEXP __declspec(dllimport)
|
2001-12-19 03:37:07 +00:00
|
|
|
# endif
|
|
|
|
# else
|
2003-04-16 22:33:18 +00:00
|
|
|
# define HAMLIB_IMPEXP __declspec(dllimport)
|
|
|
|
/* must be static build, no directive? */
|
2001-12-19 03:37:07 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2001-06-12 23:59:21 +00:00
|
|
|
/* Take care of non-cygwin platforms */
|
|
|
|
#if !defined(HAMLIB_IMPEXP)
|
2001-06-15 06:59:47 +00:00
|
|
|
# define HAMLIB_IMPEXP
|
2001-06-12 23:59:21 +00:00
|
|
|
#endif
|
2001-12-16 11:14:47 +00:00
|
|
|
#if !defined(BACKEND_IMPEXP)
|
|
|
|
# define BACKEND_IMPEXP
|
|
|
|
#endif
|
2001-06-12 23:59:21 +00:00
|
|
|
#if !defined(HAMLIB_API)
|
2001-06-15 06:59:47 +00:00
|
|
|
# define HAMLIB_API
|
2001-06-12 23:59:21 +00:00
|
|
|
#endif
|
|
|
|
#if !defined(HAMLIB_EXPORT)
|
|
|
|
# define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
|
|
|
|
#endif
|
|
|
|
#if !defined(HAMLIB_EXPORT_VAR)
|
|
|
|
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
|
|
|
|
#endif
|
2001-12-16 11:14:47 +00:00
|
|
|
#if !defined(BACKEND_EXPORT)
|
|
|
|
# define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API
|
|
|
|
#endif
|
|
|
|
#if !defined(BACKEND_EXPORT_VAR)
|
|
|
|
# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
|
|
|
|
#endif
|
2003-04-16 22:33:18 +00:00
|
|
|
|
|
|
|
#ifdef DECLARE_RIG_BACKEND
|
|
|
|
#undef DECLARE_RIG_BACKEND
|
|
|
|
#define DECLARE_RIG_BACKEND(backend) extern BACKEND_EXPORT(int) initrigs##API_VER##_##backend(void *be_handle)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DECLARE_PROBERIG_BACKEND
|
|
|
|
#undef DECLARE_PROBERIG_BACKEND
|
|
|
|
#define DECLARE_PROBERIG_BACKEND(backend) extern BACKEND_EXPORT(rig_model_t) probeallrigs##API_VER##_##backend(port_t *p, rig_probe_func_t cfunc, rig_ptr_t data)
|
|
|
|
#endif
|
|
|
|
|