raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7c85be9674eaa0362b88f01c61107aa6e7c383a2

commit 7c85be9674eaa0362b88f01c61107aa6e7c383a2
Author: Felipe Magno de Almeida <fel...@expertise.dev>
Date:   Sun May 23 20:07:10 2021 +0100

    efl: Rename EAPI macro to EFL_API in Efl sub-library
    
    Summary:
    Patch from a series of patches to rename EAPI symbols to specific
    library DSOs.
    
    =  The Rationale =
    
    EAPI was designed to be able to pass
    `__attribute__ ((visibility ("default")))` for symbols with
    GCC, which would mean that even if -fvisibility=hidden was used
    when compiling the library, the needed symbols would get exported.
    
    MSVC __almost__ works like GCC (or mingw) in which you can
    declare everything as export and it will just work (slower, but
    it will work). But there's a caveat: global variables will not
    work the same way for MSVC, but works for mingw and GCC.
    
    For global variables (as opposed to functions), MSVC requires
    correct DSO visibility for MSVC: instead of declaring a symbol as
    export for everything, you need to declare it as import when
    importing from another DSO and export when defining it locally.
    
    With current EAPI definitions, we get the following example
    working in mingw and MSVC (observe it doesn't define any global
    variables as exported symbols).
    
    Example 1:
    dll1:
    ```
    EAPI void foo(void);
    
    EAPI void bar()
    {
      foo();
    }
    ```
    dll2:
    ```
    EAPI void foo()
    {
      printf ("foo\n");
    }
    ```
    
    This works fine with API defined as __declspec(dllexport) in both
    cases and for gcc defining as
    `__atttribute__((visibility("default")))`.
    
    However, the following:
    Example 2:
    
    dll1:
    
    ```
    EAPI extern int foo;
    EAPI void foobar(void);
    
    EAPI void bar()
    {
      foo = 5;
      foobar();
    }
    ```
    
    dll2:
    
    ```
    EAPI int foo = 0;
    EAPI void foobar()
    {
      printf ("foo %d\n", foo);
    }
    ```
    
    This will work on mingw but will not work for MSVC. And that's why
    EAPI is the only solution that worked for MSVC.
    
    Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulo...@gmail.com>
    Co-authored-by: Ricardo Campos <ricardo.cam...@expertise.dev>
    Co-authored-by: Lucas Cavalcante de Sousa <lucks.so...@gmail.com>
    
    Reviewers: vtorri, raster
    
    Subscribers: raster, cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D12274
---
 src/lib/efl/Efl.h                            | 70 ++++++----------------------
 src/lib/efl/Efl_MVVM_Common.h                | 30 ++++++------
 src/lib/efl/efl_api.h                        | 32 +++++++++++++
 src/lib/efl/interfaces/efl_file.c            |  8 ++--
 src/lib/efl/interfaces/efl_file.h            |  8 ++--
 src/lib/efl/interfaces/efl_interfaces_main.c |  4 +-
 src/lib/efl/interfaces/efl_mvvm_common.c     | 32 ++++++-------
 src/lib/efl/interfaces/efl_observer.c        |  2 +-
 src/lib/efl/interfaces/meson.build           |  3 ++
 src/lib/efl/meson.build                      |  5 +-
 10 files changed, 95 insertions(+), 99 deletions(-)

diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 480249fae5..8d52ad20e2 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -7,44 +7,7 @@ extern "C" {
 
 #include <Eo.h>
 
-#ifdef EAPI
-# undef EAPI
-#endif
-#ifdef EWAPI
-# undef EWAPI
-#endif
-#ifdef EOAPI
-# undef EOAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_BUILD
-#  ifdef DLL_EXPORT
-#   define EAPI __declspec(dllexport)
-#  else
-#   define EAPI
-#  endif
-# else
-#  define EAPI __declspec(dllimport)
-# endif
-# define EAPI_WEAK
-#else
-# ifdef __GNUC__
-#  if __GNUC__ >= 4
-#   define EAPI __attribute__ ((visibility("default")))
-#   define EAPI_WEAK __attribute__ ((weak))
-#  else
-#   define EAPI
-#   define EAPI_WEAK
-#  endif
-# else
-#  define EAPI
-#  define EAPI_WEAK
-# endif
-#endif
-
-#define EWAPI EAPI EAPI_WEAK
-#define EOAPI EAPI EAPI_WEAK
+#include <efl_api.h>
 
 #define EFL_VERSION_1_18 1
 #define EFL_VERSION_1_19 1
@@ -83,39 +46,39 @@ typedef struct _Efl_Text_Attribute_Handle 
Efl_Text_Attribute_Handle;
 
 #ifdef EFL_BETA_API_SUPPORT
 /** No error on load */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_NONE;
+EFL_API EFL_API_WEAK extern Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_NONE;
 
 /** A non-specific error occurred */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
+EFL_API EFL_API_WEAK extern Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
 
 /** File (or file path) does not exist */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
+EFL_API EFL_API_WEAK extern Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
 
 /** Permission denied to an existing file (or path) */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_PERMISSION_DENIED;
+EFL_API EFL_API_WEAK extern Eina_Error 
EFL_GFX_IMAGE_LOAD_ERROR_PERMISSION_DENIED;
 
 /** Allocation of resources failure prevented load */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+EFL_API EFL_API_WEAK extern Eina_Error 
EFL_GFX_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
 
 /** File corrupt (but was detected as a known format) */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CORRUPT_FILE;
+EFL_API EFL_API_WEAK extern Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CORRUPT_FILE;
 
 /** File is not a known format */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT;
+EFL_API EFL_API_WEAK extern Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT;
 
 /** Reading operation has been cancelled during decoding */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CANCELLED;
+EFL_API EFL_API_WEAK extern Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CANCELLED;
 
 /** (Edje only) The file pointed to is incompatible, i.e., it doesn't
  * match the library's current version's format. */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE;
+EFL_API EFL_API_WEAK extern Eina_Error 
EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE;
 
 /** (Edje only) The group/collection set to load from was not found in the 
file */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION;
+EFL_API EFL_API_WEAK extern Eina_Error 
EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION;
 
 /** (Edje only) The group/collection set to load from had recursive references
  * on its components */
-extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE;
+EFL_API EFL_API_WEAK extern Eina_Error 
EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE;
 #endif /* EFL_BETA_API_SUPPORT */
 
 #include "interfaces/efl_gfx_types.eot.h"
@@ -231,11 +194,11 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
  *
  * @since 1.21
  */
-EAPI Efl_Object *efl_part(const Eo *obj, const char *name);
+EFL_API Efl_Object *efl_part(const Eo *obj, const char *name);
 
 #ifdef EFL_BETA_API_SUPPORT
 
-EAPI void efl_observable_tuple_free(Efl_Observable_Tuple *tuple);
+EFL_API void efl_observable_tuple_free(Efl_Observable_Tuple *tuple);
 
 
 
@@ -342,13 +305,10 @@ efl_config_string_get(const Efl_Config *obj, const char 
*name)
 #endif
 
 /* work-around bug in gcc --as-needed link optimization */
-EAPI void __efl_internal_init(void);
+EFL_API void __efl_internal_init(void);
 
 #if defined ( __cplusplus )
 }
 #endif
 
-#undef EAPI
-#define EAPI
-
 #endif
diff --git a/src/lib/efl/Efl_MVVM_Common.h b/src/lib/efl/Efl_MVVM_Common.h
index d928fa55c1..6dcb74b9d1 100644
--- a/src/lib/efl/Efl_MVVM_Common.h
+++ b/src/lib/efl/Efl_MVVM_Common.h
@@ -3,22 +3,22 @@
 
 #include <Eina.h>
 
-EAPI extern Eina_Error EFL_MODEL_ERROR_UNKNOWN;
-EAPI extern Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED;
-EAPI extern Eina_Error EFL_MODEL_ERROR_NOT_FOUND;
-EAPI extern Eina_Error EFL_MODEL_ERROR_READ_ONLY;
-EAPI extern Eina_Error EFL_MODEL_ERROR_INIT_FAILED;
-EAPI extern Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE;
-EAPI extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED;
-EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */
+EFL_API extern Eina_Error EFL_MODEL_ERROR_UNKNOWN;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_NOT_FOUND;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_READ_ONLY;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_INIT_FAILED;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED;
+EFL_API extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */
 
-EAPI extern Eina_Error EFL_PROPERTY_ERROR_INVALID_KEY; /**< Returned when the 
given key during a efl_ui_property_bind does not exist on the object. */
+EFL_API extern Eina_Error EFL_PROPERTY_ERROR_INVALID_KEY; /**< Returned when 
the given key during a efl_ui_property_bind does not exist on the object. */
 
-EAPI extern Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED; /**< Returned error 
when factory got a request that it can't fullfil due to a set of unsupported 
parameters @since 1.22 */
+EFL_API extern Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED; /**< Returned error 
when factory got a request that it can't fullfil due to a set of unsupported 
parameters @since 1.22 */
 
 #include "interfaces/efl_model.eo.h"
 
-EAPI int efl_model_init(void);
+EFL_API int efl_model_init(void);
 
 
 /**
@@ -29,7 +29,7 @@ EAPI int efl_model_init(void);
  *
  * @since 1.17
  */
-EAPI void _efl_model_properties_changed_internal(const Efl_Model *model, ...);
+EFL_API void _efl_model_properties_changed_internal(const Efl_Model *model, 
...);
 
 #define efl_model_properties_changed(Model, ...) 
_efl_model_properties_changed_internal(Model, ##__VA_ARGS__, NULL)
 
@@ -41,7 +41,7 @@ EAPI void _efl_model_properties_changed_internal(const 
Efl_Model *model, ...);
  *
  * @since 1.17
  */
-EAPI void efl_model_property_invalidated_notify(Efl_Model *model, const char 
*property);
+EFL_API void efl_model_property_invalidated_notify(Efl_Model *model, const 
char *property);
 
 /**
  * @brief Callback to setup a member of @c Eina_Value_Struct
@@ -62,7 +62,7 @@ typedef void (*Efl_Model_Value_Struct_Member_Setup_Cb)(void 
*data, int index, Ei
  *
  * @since 1.17
  */
-EAPI Eina_Value_Struct_Desc *efl_model_value_struct_description_new(unsigned 
int member_count, Efl_Model_Value_Struct_Member_Setup_Cb setup_cb, void *data) 
EINA_ARG_NONNULL(2);
+EFL_API Eina_Value_Struct_Desc 
*efl_model_value_struct_description_new(unsigned int member_count, 
Efl_Model_Value_Struct_Member_Setup_Cb setup_cb, void *data) 
EINA_ARG_NONNULL(2);
 
 /**
  * @brief Frees the memory allocated to the struct description.
@@ -71,6 +71,6 @@ EAPI Eina_Value_Struct_Desc 
*efl_model_value_struct_description_new(unsigned int
  *
  * @since 1.17
  */
-EAPI void efl_model_value_struct_description_free(Eina_Value_Struct_Desc 
*desc);
+EFL_API void efl_model_value_struct_description_free(Eina_Value_Struct_Desc 
*desc);
 
 #endif
diff --git a/src/lib/efl/efl_api.h b/src/lib/efl/efl_api.h
new file mode 100644
index 0000000000..51e4905d11
--- /dev/null
+++ b/src/lib/efl/efl_api.h
@@ -0,0 +1,32 @@
+#ifndef _EFL_EFL_API_H
+#define _EFL_EFL_API_H
+
+#ifdef EFL_API
+#error EFL_API should not be already defined
+#endif
+
+#ifdef _WIN32
+# ifndef EFL_STATIC
+#  ifdef EFL_BUILD
+#   define EFL_API __declspec(dllexport)
+#  else
+#   define EFL_API __declspec(dllimport)
+#  endif
+# else
+#  define EFL_API
+# endif
+# define EFL_API_WEAK
+#elif defined(__GNUC__)
+# if __GNUC__ >= 4
+#  define EFL_API __attribute__ ((visibility("default")))
+#  define EFL_API_WEAK __attribute__ ((weak))
+# else
+#  define EFL_API
+#  define EFL_API_WEAK
+# endif
+#else
+# define EFL_API
+# define EFL_API_WEAK
+#endif
+
+#endif
diff --git a/src/lib/efl/interfaces/efl_file.c 
b/src/lib/efl/interfaces/efl_file.c
index 206a4eb789..d97178c99c 100644
--- a/src/lib/efl/interfaces/efl_file.c
+++ b/src/lib/efl/interfaces/efl_file.c
@@ -167,7 +167,7 @@ _efl_file_efl_object_finalize(Eo *obj, Efl_File_Data *pd)
 
 ////////////////////////////////////////////////////////////////////////////
 
-EAPI Eina_Bool
+EFL_API Eina_Bool
 efl_file_simple_load(Eo *obj, const char *file, const char *key)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
@@ -192,7 +192,7 @@ fail:
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool
+EFL_API Eina_Bool
 efl_file_simple_mmap_load(Eo *obj, const Eina_File *file, const char *key)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
@@ -213,7 +213,7 @@ fail:
    return EINA_FALSE;
 }
 
-EAPI void
+EFL_API void
 efl_file_simple_get(const Eo *obj, const char **file, const char **key)
 {
    efl_ref((Eo*)obj);
@@ -222,7 +222,7 @@ efl_file_simple_get(const Eo *obj, const char **file, const 
char **key)
    efl_unref((Eo*)obj);
 }
 
-EAPI void
+EFL_API void
 efl_file_simple_mmap_get(const Eo *obj, const Eina_File **file, const char 
**key)
 {
    efl_ref((Eo*)obj);
diff --git a/src/lib/efl/interfaces/efl_file.h 
b/src/lib/efl/interfaces/efl_file.h
index d0457148e4..be56f5b371 100644
--- a/src/lib/efl/interfaces/efl_file.h
+++ b/src/lib/efl/interfaces/efl_file.h
@@ -2,9 +2,9 @@
 # define _EFL_FILE_H
 
 /* add doc note about needing ref/unref when passing efl_part to these 
functions */
-EAPI Eina_Bool efl_file_simple_load(Eo *obj, const char *file, const char 
*key);
-EAPI Eina_Bool efl_file_simple_mmap_load(Eo *obj, const Eina_File *file, const 
char *key);
-EAPI void efl_file_simple_get(const Eo *obj, const char **file, const char 
**key);
-EAPI void efl_file_simple_mmap_get(const Eo *obj, const Eina_File **file, 
const char **key);
+EFL_API Eina_Bool efl_file_simple_load(Eo *obj, const char *file, const char 
*key);
+EFL_API Eina_Bool efl_file_simple_mmap_load(Eo *obj, const Eina_File *file, 
const char *key);
+EFL_API void efl_file_simple_get(const Eo *obj, const char **file, const char 
**key);
+EFL_API void efl_file_simple_mmap_get(const Eo *obj, const Eina_File **file, 
const char **key);
 
 #endif
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c 
b/src/lib/efl/interfaces/efl_interfaces_main.c
index 4856df5a6e..5cf5569f6f 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -85,7 +85,7 @@ _noref_death(void *data EINA_UNUSED, const Efl_Event *event)
    efl_del(event->object);
 }
 
-EAPI Efl_Object *
+EFL_API Efl_Object *
 efl_part(const Eo *obj, const char *name)
 {
    Efl_Object *r;
@@ -105,7 +105,7 @@ efl_part(const Eo *obj, const char *name)
    return efl_ref(r);
 }
 
-EAPI void
+EFL_API void
 __efl_internal_init(void)
 {
    efl_model_init();
diff --git a/src/lib/efl/interfaces/efl_mvvm_common.c 
b/src/lib/efl/interfaces/efl_mvvm_common.c
index a2c7fa4f8d..163abf0141 100644
--- a/src/lib/efl/interfaces/efl_mvvm_common.c
+++ b/src/lib/efl/interfaces/efl_mvvm_common.c
@@ -5,17 +5,17 @@
 #include "Efl.h"
 #include "Efl_MVVM_Common.h"
 
-EAPI Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_NOT_FOUND = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_READ_ONLY = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_INIT_FAILED = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0;
-EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0;
-
-EAPI Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED = 0;
-EAPI Eina_Error EFL_PROPERTY_ERROR_INVALID_KEY = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_NOT_FOUND = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_READ_ONLY = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_INIT_FAILED = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0;
+EFL_API Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0;
+
+EFL_API Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED = 0;
+EFL_API Eina_Error EFL_PROPERTY_ERROR_INVALID_KEY = 0;
 
 static const char EFL_MODEL_ERROR_UNKNOWN_STR[]           = "Unknown Error";
 static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[]     = "Operation not 
supported";
@@ -31,7 +31,7 @@ static const char EFL_FACTORY_ERROR_NOT_SUPPORTED_STR[]   = 
"Operation not suppo
 static const char EFL_PROPERTY_ERROR_INVALID_KEY_STR[]    = "Incorrect key 
provided";
 
 
-EAPI int
+EFL_API int
 efl_model_init(void)
 {
 #define _ERROR(Name) EFL_MODEL_ERROR_##Name = 
eina_error_msg_static_register(EFL_MODEL_ERROR_##Name##_STR);
@@ -57,7 +57,7 @@ efl_model_init(void)
 
 #undef _ERROR
 
-EAPI void
+EFL_API void
 _efl_model_properties_changed_internal(const Efl_Model *model, ...)
 {
    Efl_Model_Property_Event ev = { 0 };
@@ -84,7 +84,7 @@ _efl_model_properties_changed_internal(const Efl_Model 
*model, ...)
    eina_array_free(properties);
 }
 
-EAPI void
+EFL_API void
 efl_model_property_invalidated_notify(Efl_Model *model, const char *property)
 {
    Eina_Array *invalidated_properties = eina_array_new(1);
@@ -112,7 +112,7 @@ struct _Efl_Model_Value_Struct_Desc
    Eina_Value_Struct_Member members[];
 };
 
-EAPI Eina_Value_Struct_Desc *
+EFL_API Eina_Value_Struct_Desc *
 efl_model_value_struct_description_new(unsigned int member_count, 
Efl_Model_Value_Struct_Member_Setup_Cb setup_cb, void *data)
 {
    Efl_Model_Value_Struct_Desc *desc;
@@ -152,7 +152,7 @@ efl_model_value_struct_description_new(unsigned int 
member_count, Efl_Model_Valu
    return &desc->base;
 }
 
-EAPI void
+EFL_API void
 efl_model_value_struct_description_free(Eina_Value_Struct_Desc *desc)
 {
    size_t i;
diff --git a/src/lib/efl/interfaces/efl_observer.c 
b/src/lib/efl/interfaces/efl_observer.c
index 8656b801b9..40d747e4fd 100644
--- a/src/lib/efl/interfaces/efl_observer.c
+++ b/src/lib/efl/interfaces/efl_observer.c
@@ -257,7 +257,7 @@ _efl_observable_iterator_tuple_new(Eo *obj, 
Efl_Observable_Data *pd)
    return &it->iterator;
 }
 
-EAPI void
+EFL_API void
 efl_observable_tuple_free(Efl_Observable_Tuple *tuple)
 {
    //key is not owned
diff --git a/src/lib/efl/interfaces/meson.build 
b/src/lib/efl/interfaces/meson.build
index 0b1bdd4556..c31c27661f 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -25,6 +25,7 @@ foreach eo_file : pub_legacy_eo_files
                            '-o', 'h:' + join_paths(meson.current_build_dir(), 
eo_file + '.h'),
                            '-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
                            '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
+                           '-e', 'EFL_API',
                            '-gchd', '@INPUT@'])
 endforeach
 
@@ -107,6 +108,7 @@ foreach eo_file : pub_eo_files
                            '-o', 'h:' + join_paths(meson.current_build_dir(), 
eo_file + '.h'),
                            '-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
                            '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
+                           '-e', 'EFL_API',
                            '-gchd', '@INPUT@'])
 endforeach
 
@@ -129,6 +131,7 @@ foreach eo_file : pub_eo_types_files
     command : eolian_gen + [ '-I', meson.current_source_dir(), 
eolian_include_directories,
                            '-o', 'h:' + join_paths(meson.current_build_dir(), 
eo_file + '.h'),
                            '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
+                           '-e', 'EFL_API',
                            '-ghd', '@INPUT@'])
 endforeach
 
diff --git a/src/lib/efl/meson.build b/src/lib/efl/meson.build
index 5dbc825894..5ad170828d 100644
--- a/src/lib/efl/meson.build
+++ b/src/lib/efl/meson.build
@@ -4,7 +4,8 @@ efl_ext_deps = []
 
 efl_header_src = [
   'Efl.h',
-  'Efl_MVVM_Common.h'
+  'Efl_MVVM_Common.h',
+  'efl_api.h'
 ]
 
 efl_src = []
@@ -14,7 +15,7 @@ package_header_subdirs += 'interfaces'
 
 efl_lib = library('efl',
     efl_src, pub_eo_file_target,
-    c_args : package_c_args,
+    c_args : [package_c_args, '-DEFL_BUILD'],
     dependencies: [efl_deps, efl_pub_deps, efl_ext_deps],
     install: true,
     version : meson.project_version()

-- 


Reply via email to