|
@@ -44,7 +44,6 @@
|
|
|
# define __PRETTY_FUNCTION__ __FUNCSIG__
|
|
# define __PRETTY_FUNCTION__ __FUNCSIG__
|
|
|
#else
|
|
#else
|
|
|
# pragma error "No known compiler. "
|
|
# pragma error "No known compiler. "
|
|
|
-
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
// Finds the current platform
|
|
// Finds the current platform
|
|
@@ -63,25 +62,37 @@
|
|
|
# define BS_ARCH_TYPE BS_ARCHITECTURE_x86_32
|
|
# define BS_ARCH_TYPE BS_ARCHITECTURE_x86_32
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
+// DLL export
|
|
|
|
|
+#if BS_PLATFORM == BS_PLATFORM_WIN32 // Windows
|
|
|
|
|
+# if BS_COMPILER == BS_COMPILER_MSVC
|
|
|
|
|
+# if defined(BS_STATIC_LIB)
|
|
|
|
|
+# define BS_UTILITY_EXPORT
|
|
|
|
|
+# else
|
|
|
|
|
+# if defined(BS_UTILITY_EXPORTS)
|
|
|
|
|
+# define BS_UTILITY_EXPORT __declspec(dllexport)
|
|
|
|
|
+# else
|
|
|
|
|
+# define BS_UTILITY_EXPORT __declspec(dllimport)
|
|
|
|
|
+# endif
|
|
|
|
|
+# endif
|
|
|
|
|
+# else
|
|
|
|
|
+# if defined(BS_STATIC_LIB)
|
|
|
|
|
+# define BS_UTILITY_EXPORT
|
|
|
|
|
+# else
|
|
|
|
|
+# if defined(BS_UTILITY_EXPORTS)
|
|
|
|
|
+# define BS_UTILITY_EXPORT __attribute__ ((dllexport))
|
|
|
|
|
+# else
|
|
|
|
|
+# define BS_UTILITY_EXPORT __attribute__ ((dllimport))
|
|
|
|
|
+# endif
|
|
|
|
|
+# endif
|
|
|
|
|
+# endif
|
|
|
|
|
+# define BS_UTILITY_HIDDEN
|
|
|
|
|
+#else // Linux/Mac settings
|
|
|
|
|
+# define BS_UTILITY_EXPORT __attribute__ ((visibility ("default")))
|
|
|
|
|
+# define BS_UTILITY_HIDDEN __attribute__ ((visibility ("hidden")))
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
// Windows Settings
|
|
// Windows Settings
|
|
|
#if BS_PLATFORM == BS_PLATFORM_WIN32
|
|
#if BS_PLATFORM == BS_PLATFORM_WIN32
|
|
|
-
|
|
|
|
|
-// If we're not including this from a client build, specify that the stuff
|
|
|
|
|
-// should get exported. Otherwise, import it.
|
|
|
|
|
-# if defined( BS_STATIC_LIB )
|
|
|
|
|
- // Linux compilers don't have symbol import/export directives.
|
|
|
|
|
-# define BS_UTILITY_EXPORT
|
|
|
|
|
-# else
|
|
|
|
|
-# if defined(BS_UTILITY_EXPORTS)
|
|
|
|
|
-# define BS_UTILITY_EXPORT __declspec( dllexport )
|
|
|
|
|
-# else
|
|
|
|
|
-# if defined( __MINGW32__ )
|
|
|
|
|
-# define BS_UTILITY_EXPORT
|
|
|
|
|
-# else
|
|
|
|
|
-# define BS_UTILITY_EXPORT __declspec( dllimport )
|
|
|
|
|
-# endif
|
|
|
|
|
-# endif
|
|
|
|
|
-# endif
|
|
|
|
|
// Win32 compilers use _DEBUG for specifying debug builds.
|
|
// Win32 compilers use _DEBUG for specifying debug builds.
|
|
|
// for MinGW, we set DEBUG
|
|
// for MinGW, we set DEBUG
|
|
|
# if defined(_DEBUG) || defined(DEBUG)
|
|
# if defined(_DEBUG) || defined(DEBUG)
|
|
@@ -93,19 +104,10 @@
|
|
|
# if BS_COMPILER == BS_COMPILER_INTEL
|
|
# if BS_COMPILER == BS_COMPILER_INTEL
|
|
|
# define BS_THREADLOCAL __declspec(thread)
|
|
# define BS_THREADLOCAL __declspec(thread)
|
|
|
# endif
|
|
# endif
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
-#endif // BS_PLATFORM == BS_PLATFORM_WIN32
|
|
|
|
|
-
|
|
|
|
|
-// Linux/Apple Settings
|
|
|
|
|
|
|
+// Linux/Mac Settings
|
|
|
#if BS_PLATFORM == BS_PLATFORM_LINUX || BS_PLATFORM == BS_PLATFORM_OSX
|
|
#if BS_PLATFORM == BS_PLATFORM_LINUX || BS_PLATFORM == BS_PLATFORM_OSX
|
|
|
-
|
|
|
|
|
-// Enable GCC symbol visibility
|
|
|
|
|
-# if defined( BS_GCC_VISIBILITY )
|
|
|
|
|
-# define BS_UTILITY_EXPORT __attribute__ ((visibility("default")))
|
|
|
|
|
-# else
|
|
|
|
|
-# define BS_UTILITY_EXPORT
|
|
|
|
|
-# endif
|
|
|
|
|
-
|
|
|
|
|
# ifdef DEBUG
|
|
# ifdef DEBUG
|
|
|
# define BS_DEBUG_MODE 1
|
|
# define BS_DEBUG_MODE 1
|
|
|
# else
|
|
# else
|
|
@@ -115,5 +117,4 @@
|
|
|
# if BS_COMPILER == BS_COMPILER_INTEL
|
|
# if BS_COMPILER == BS_COMPILER_INTEL
|
|
|
# define BS_THREADLOCAL __thread
|
|
# define BS_THREADLOCAL __thread
|
|
|
# endif
|
|
# endif
|
|
|
-
|
|
|
|
|
#endif
|
|
#endif
|