1 #pragma once 2 3 #ifndef Y_CONSTANTS_H 4 #define Y_CONSTANTS_H 5 6 #define __BEGIN_YAFRAY namespace yafaray { 7 #define __END_YAFRAY } 8 9 #define PACKAGE "YafaRay" 10 11 #if (__GNUC__ > 3) 12 #define GCC_HASCLASSVISIBILITY 13 #endif 14 15 // define symbol export and import attributes 16 #ifdef _WIN32 17 #define YF_EXPORT __declspec(dllexport) 18 #define YF_IMPORT __declspec(dllimport) 19 #else 20 #ifdef GCC_HASCLASSVISIBILITY 21 #define YF_EXPORT __attribute__ ((visibility("default"))) 22 #define YF_IMPORT __attribute__ ((visibility("default"))) 23 #else 24 #define YF_EXPORT 25 #define YF_IMPORT 26 #endif 27 #endif 28 29 // automatic macros that switch between import and export, depending on compiler environment 30 #ifdef BUILDING_YAFRAYCORE 31 #define YAFRAYCORE_EXPORT YF_EXPORT 32 #else 33 #define YAFRAYCORE_EXPORT YF_IMPORT 34 #endif 35 36 #ifdef BUILDING_YAFRAYPLUGIN 37 #define YAFRAYPLUGIN_EXPORT YF_EXPORT 38 #else 39 #define YAFRAYPLUGIN_EXPORT YF_IMPORT 40 #endif 41 42 #endif // Y_CONSTANTS_H 43