aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/pugl/pugl.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h
index bb21a29..7cb7bc2 100644
--- a/include/pugl/pugl.h
+++ b/include/pugl/pugl.h
@@ -21,19 +21,12 @@
#include <stddef.h>
#include <stdint.h>
-#ifdef PUGL_SHARED
-# ifdef _WIN32
-# define PUGL_LIB_IMPORT __declspec(dllimport)
-# define PUGL_LIB_EXPORT __declspec(dllexport)
-# else
-# define PUGL_LIB_IMPORT __attribute__((visibility("default")))
-# define PUGL_LIB_EXPORT __attribute__((visibility("default")))
-# endif
-# ifdef PUGL_INTERNAL
-# define PUGL_API PUGL_LIB_EXPORT
-# else
-# define PUGL_API PUGL_LIB_IMPORT
-# endif
+#if defined(_WIN32) && !defined(PUGL_STATIC) && defined(PUGL_INTERNAL)
+# define PUGL_API __declspec(dllexport)
+#elif defined(_WIN32) && !defined(PUGL_STATIC)
+# define PUGL_API __declspec(dllimport)
+#elif defined(__GNUC__)
+# define PUGL_API __attribute__((visibility("default")))
#else
# define PUGL_API
#endif