aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/serd/serd.h6
-rw-r--r--wscript8
2 files changed, 7 insertions, 7 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 32a60f29..88cd659a 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -25,11 +25,11 @@
#include <stdint.h>
#include <stdio.h>
-#if defined(SERD_SHARED) && defined(SERD_INTERNAL) && defined(_WIN32)
+#if defined(_WIN32) && !defined(SERD_STATIC) && defined(SERD_INTERNAL)
# define SERD_API __declspec(dllexport)
-#elif defined(SERD_SHARED) && defined(_WIN32)
+#elif defined(_WIN32) && !defined(SERD_STATIC)
# define SERD_API __declspec(dllimport)
-#elif defined(SERD_SHARED) && defined(__GNUC__)
+#elif defined(__GNUC__)
# define SERD_API __attribute__((visibility("default")))
#else
# define SERD_API
diff --git a/wscript b/wscript
index 397278c2..ecf3c8de 100644
--- a/wscript
+++ b/wscript
@@ -206,7 +206,7 @@ def build(bld):
source = lib_source,
name = 'libserd',
target = 'serd-%s' % SERD_MAJOR_VERSION,
- defines = defines + ['SERD_SHARED', 'SERD_INTERNAL'],
+ defines = defines + ['SERD_INTERNAL'],
**lib_args)
# Static library
@@ -215,7 +215,7 @@ def build(bld):
source = lib_source,
name = 'libserd_static',
target = 'serd-%s' % SERD_MAJOR_VERSION,
- defines = defines + ['SERD_INTERNAL'],
+ defines = defines + ['SERD_STATIC', 'SERD_INTERNAL'],
**lib_args)
if bld.env.BUILD_TESTS:
@@ -231,7 +231,7 @@ def build(bld):
source = lib_source,
name = 'libserd_profiled',
target = 'serd_profiled',
- defines = defines + ['SERD_INTERNAL'],
+ defines = defines + ['SERD_STATIC', 'SERD_INTERNAL'],
**test_args)
# Test programs
@@ -247,7 +247,7 @@ def build(bld):
source = prog[1],
use = 'libserd_profiled',
target = prog[0],
- defines = defines,
+ defines = defines + ['SERD_STATIC'],
**test_args)
# Utilities