00001
00002
00003
00004
00005
00006
00007
00009
00010 #ifndef API_H_INCLUDED
00011 #define API_H_INCLUDED
00012
00013 #include "platform.h"
00014
00015
00016 #ifdef SM2_DSP
00017 #ifdef DEBUG2
00018 #include <stdio.h>
00019 #define DEB(x) x
00020 #else
00021 #define DEB(x)
00022 #endif
00023 #else
00024 #ifdef DEBUG
00025 #include <stdio.h>
00026 #define DEB(x) x
00027 #else
00028 #define DEB(x)
00029 #endif
00030 #endif
00031
00032
00033 #if defined(__linux__ ) || !defined(USE_STDCALL)
00034 #define APIDECL
00035 #else
00036 #define APIDECL WINAPI
00037 #endif
00038
00039
00040 #ifndef EXTERN_C
00041 #ifdef __cplusplus
00042 #define EXTERN_C extern "C"
00043 #else
00044 #define EXTERN_C
00045 #endif
00046 #endif
00047
00048 #ifdef __cplusplus
00049 #define PF_INLINE inline
00050 #else
00051 #ifdef __GNUC__
00052 #define PF_INLINE static __inline__
00053 #else
00054 #define PF_INLINE
00055 #endif
00056 #endif
00057
00058 #ifndef SM2_DSP
00059 #if defined (WIN32)
00060 #if defined (CAMDLL_EXPORTS) || defined (CAMWRAPPER_EXPORTS)
00061 #define CAMDLL_API EXTERN_C __declspec(dllexport)
00062 #else
00063 #define CAMDLL_API EXTERN_C __declspec(dllimport)
00064 #endif
00065
00066 #ifdef COMDLL_EXPORTS
00067 #define COMDLL_API EXTERN_C __declspec(dllexport)
00068 #else
00069 #define COMDLL_API EXTERN_C __declspec(dllimport)
00070 #endif
00071 #else
00072 #define CAMDLL_API
00073 #define COMDLL_API
00074 #endif
00075 #else
00076 #define CAMDLL_API
00077 #define COMDLL_API EXTERN_C
00078
00079 #endif
00080
00081
00082 #endif // API_H_INCLUDED