2011-08-21 01:54:17 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Win32 DLL build definitions
|
|
|
|
* Copyright (c) 2001-2009 by Stephane Fillod
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
2001-06-12 23:59:21 +00:00
|
|
|
|
2006-10-13 12:02:36 +00:00
|
|
|
/*
|
|
|
|
* Provide definitions to compile in Windows
|
|
|
|
* using C-friendly options, e.g.
|
|
|
|
*
|
|
|
|
* HAMLIB_API -> __cdecl
|
|
|
|
* HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport)
|
|
|
|
* BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport)
|
|
|
|
*
|
|
|
|
* No effect in non-Windows environments.
|
|
|
|
*/
|
2001-06-12 23:59:21 +00:00
|
|
|
|
2003-04-23 20:13:04 +00:00
|
|
|
#if defined(_WIN32) && !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
|
2007-05-21 21:41:59 +00:00
|
|
|
# undef HAMLIB_DLL_IMPORT
|
|
|
|
# undef HAMLIB_DLL_EXPORT
|
|
|
|
|
|
|
|
# if defined (__BORLANDC__)
|
2017-08-07 13:04:25 +00:00
|
|
|
# define HAMLIB_DLL_IMPORT __import
|
|
|
|
# define HAMLIB_DLL_EXPORT __export
|
2007-05-21 21:41:59 +00:00
|
|
|
# else
|
2017-08-07 13:04:25 +00:00
|
|
|
# define HAMLIB_DLL_IMPORT __declspec(dllimport)
|
|
|
|
# define HAMLIB_DLL_EXPORT __declspec(dllexport)
|
2007-05-21 21:41:59 +00:00
|
|
|
# endif
|
|
|
|
|
2001-12-19 03:37:07 +00:00
|
|
|
# ifdef DLL_EXPORT
|
2017-08-07 13:04:25 +00:00
|
|
|
/* HAMLIB_API may be set to __stdcall for VB, .. */
|
2003-04-16 22:33:18 +00:00
|
|
|
# define HAMLIB_API __cdecl
|
2001-12-19 03:37:07 +00:00
|
|
|
# ifdef IN_HAMLIB
|
2007-05-21 21:41:59 +00:00
|
|
|
# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
|
|
|
|
# define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
|
2001-12-19 03:37:07 +00:00
|
|
|
# else
|
2007-05-21 21:41:59 +00:00
|
|
|
# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
|
|
|
|
# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
|
2001-12-19 03:37:07 +00:00
|
|
|
# endif
|
|
|
|
# else
|
2017-08-07 13:04:25 +00:00
|
|
|
/* static build, only export the backend entry points for lt_dlsym */
|
|
|
|
# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
|
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
|