Browse Source

Improve structure of os specific dynamic library logic

Patrick-Christopher Mattulat 2 years ago
parent
commit
9415128afd

+ 20 - 0
include/ls_std/os/dynamic_goal.hpp

@@ -0,0 +1,20 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-06-29
+ * Changed:         2022-06-29
+ *
+ * */
+
+#ifndef LS_STD_DYNAMIC_GOAL_HPP
+#define LS_STD_DYNAMIC_GOAL_HPP
+
+#ifdef _WIN32
+#include <ls_std/os/windows/msvc_dll_definitions.hpp>
+#endif
+#if defined(unix) || defined(__APPLE__)
+#include <ls_std/os/unix/unix_so_definitions.hpp>
+#endif
+
+#endif

+ 15 - 0
include/ls_std/os/unix/unix_so_definitions.hpp

@@ -0,0 +1,15 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-06-29
+ * Changed:         2022-06-29
+ *
+ * */
+
+#ifndef LS_STD_UNIX_SO_DEFINITIONS_HPP
+#define LS_STD_UNIX_SO_DEFINITIONS_HPP
+
+#define DYNAMIC_GOAL
+
+#endif

+ 3 - 1
include/ls_std/msvc_dll_definitions.hpp → include/ls_std/os/windows/msvc_dll_definitions.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-06-26
- * Changed:         2022-06-26
+ * Changed:         2022-06-29
  *
  * */
 
@@ -11,5 +11,7 @@
 #define LS_STD_MSVC_DLL_DEFINITIONS_HPP
 
 #define DLL_EXPORT        __declspec(dllexport)
+#define DLL_IMPORT        __declspec(dllimport)
+#define DYNAMIC_GOAL      DLL_EXPORT
 
 #endif