diff options
Diffstat (limited to 'src/common/Define.h')
-rw-r--r-- | src/common/Define.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/common/Define.h b/src/common/Define.h index 36fb88f2af..159f7822db 100644 --- a/src/common/Define.h +++ b/src/common/Define.h @@ -64,6 +64,45 @@ # define ATTR_DEPRECATED #endif //AC_COMPILER == AC_COMPILER_GNU +#ifdef ACORE_API_USE_DYNAMIC_LINKING +# if AC_COMPILER == AC_COMPILER_MICROSOFT +# define AC_API_EXPORT __declspec(dllexport) +# define AC_API_IMPORT __declspec(dllimport) +# elif AC_COMPILER == AC_COMPILER_GNU +# define AC_API_EXPORT __attribute__((visibility("default"))) +# define AC_API_IMPORT +# else +# error compiler not supported! +# endif +#else +# define AC_API_EXPORT +# define AC_API_IMPORT +#endif + +#ifdef ACORE_API_EXPORT_COMMON +# define AC_COMMON_API AC_API_EXPORT +#else +# define AC_COMMON_API AC_API_IMPORT +#endif + +#ifdef ACORE_API_EXPORT_DATABASE +# define AC_DATABASE_API AC_API_EXPORT +#else +# define AC_DATABASE_API AC_API_IMPORT +#endif + +#ifdef ACORE_API_EXPORT_SHARED +# define AC_SHARED_API AC_API_EXPORT +#else +# define AC_SHARED_API AC_API_IMPORT +#endif + +#ifdef ACORE_API_EXPORT_GAME +# define AC_GAME_API AC_API_EXPORT +#else +# define AC_GAME_API AC_API_IMPORT +#endif + #define UI64FMTD "%" PRIu64 #define UI64LIT(N) UINT64_C(N) |