Export.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /****************************************************************************
  2. Copyright (c) 2010-2012 cocos2d-x.org
  3. Copyright (c) 2013-2016 Chukong Technologies Inc.
  4. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
  5. http://www.cocos2d-x.org
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. THE SOFTWARE.
  21. ****************************************************************************/
  22. #ifndef __EXPORT_COMMON__
  23. #define __EXPORT_COMMON__
  24. #if defined(SHP)
  25. #include <FBaseConfig.h>
  26. #define EXPORT_DLL _EXPORT_
  27. #elif defined(_WIN32)
  28. #if defined(CC_STATIC)
  29. #define EXPORT_DLL
  30. #else
  31. #if defined(_EXPORT_DLL_)
  32. #define EXPORT_DLL __declspec(dllexport)
  33. #else /* use a DLL library */
  34. #define EXPORT_DLL __declspec(dllimport)
  35. #endif
  36. #endif
  37. #else
  38. #if defined(_SHARED_)
  39. #define EXPORT_DLL __attribute__((visibility("default")))
  40. #elif defined(IGNORE_EXPORT)
  41. #define EXPORT_DLL
  42. #else
  43. #define EXPORT_DLL
  44. #endif
  45. #endif
  46. #endif // end of __EXPORT_COMMON__