mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-12-01 16:56:34 +01:00
113 lines
3.6 KiB
C
Executable File
113 lines
3.6 KiB
C
Executable File
/* ****************************************************************************
|
|
* LCUI_Build.h -- macro definition defines the location of some header files
|
|
*
|
|
* Copyright (C) 2013-2015 by Liu Chao <lc-soft@live.cn>
|
|
*
|
|
* This file is part of the LCUI project, and may only be used, modified, and
|
|
* distributed under the terms of the GPLv2.
|
|
*
|
|
* (GPLv2 is abbreviation of GNU General Public License Version 2)
|
|
*
|
|
* By continuing to use, modify, or distribute this file you indicate that you
|
|
* have read the license and understand and accept it fully.
|
|
*
|
|
* The LCUI project is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v2 for more details.
|
|
*
|
|
* You should have received a copy of the GPLv2 along with this file. It is
|
|
* usually in the LICENSE.TXT file, If not, see <http://www.gnu.org/licenses/>.
|
|
* ****************************************************************************/
|
|
|
|
/* ****************************************************************************
|
|
* LCUI_Build.h -- 定义了一些头文件的位置的宏定义
|
|
*
|
|
* 版权所有 (C) 2013-2015 归属于 刘超 <lc-soft@live.cn>
|
|
*
|
|
* 这个文件是LCUI项目的一部分,并且只可以根据GPLv2许可协议来使用、更改和发布。
|
|
*
|
|
* (GPLv2 是 GNU通用公共许可证第二版 的英文缩写)
|
|
*
|
|
* 继续使用、修改或发布本文件,表明您已经阅读并完全理解和接受这个许可协议。
|
|
*
|
|
* LCUI 项目是基于使用目的而加以散布的,但不负任何担保责任,甚至没有适销性或特
|
|
* 定用途的隐含担保,详情请参照GPLv2许可协议。
|
|
*
|
|
* 您应已收到附随于本文件的GPLv2许可协议的副本,它通常在LICENSE.TXT文件中,如果
|
|
* 没有,请查看:<http://www.gnu.org/licenses/>.
|
|
* ****************************************************************************/
|
|
|
|
#ifndef __LCUI_BUILD_H__
|
|
#define __LCUI_BUILD_H__
|
|
|
|
#if defined(__GNUC__)
|
|
# define LCUI_API
|
|
#elif (defined(_MSC_VER) && _MSC_VER < 800) ||\
|
|
(defined(__BORLANDC__) && __BORLANDC__ < 0x500)
|
|
/* older Borland and MSC
|
|
* compilers used '__export' and required this to be after
|
|
* the type.
|
|
*/
|
|
# define LCUI_API __export
|
|
#else /* newer compiler */
|
|
# ifdef LCUI_EXPORTS
|
|
# define LCUI_API __declspec(dllexport)
|
|
# else
|
|
# define LCUI_API
|
|
# endif
|
|
#endif /* compiler */
|
|
|
|
#ifdef DEBUG
|
|
#define DEBUG_MSG _DEBUG_MSG
|
|
#else
|
|
#define DEBUG_MSG(format, ...)
|
|
#endif
|
|
|
|
#ifdef DEBUG1
|
|
#define DEBUG_MSG1 _DEBUG_MSG
|
|
#else
|
|
#define DEBUG_MSG1(format, ...)
|
|
#endif
|
|
|
|
#ifdef DEBUG2
|
|
#define DEBUG_MSG2 _DEBUG_MSG
|
|
#else
|
|
#define DEBUG_MSG2(format, ...)
|
|
#endif
|
|
|
|
#define _DEBUG_MSG(format, ...) printf(__FILE__" %d: %s(): "format, __LINE__, __FUNCTION__,##__VA_ARGS__)
|
|
|
|
#if defined(WIN32) && !defined(__cplusplus)
|
|
#define inline __inline
|
|
#endif
|
|
|
|
#if defined(WIN32) || defined(_WIN32)
|
|
#define LCUI_BUILD_IN_WIN32
|
|
#define LCUI_THREAD_WIN32
|
|
#define LCUI_VIDEO_DRIVER_WIN32
|
|
#define LCUI_FONT_ENGINE_FREETYPE
|
|
#define USE_LIBPNG
|
|
#define USE_LIBJPEG
|
|
#undef USE_TSLIB
|
|
#undef LCUI_THREAD_PTHREAD
|
|
#undef LCUI_VIDEO_DRIVER_FRAMEBUFFER
|
|
#else
|
|
#include <LCUI/config.h>
|
|
#ifndef _GNU_SOURCE
|
|
#define _GNU_SOURCE
|
|
#endif
|
|
#define LCUI_BUILD_IN_LINUX
|
|
#define LCUI_KEYBOARD_DRIVER_LINUX
|
|
#define LCUI_MOUSE_DRIVER_LINUX
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
#define LCUI_BEGIN_HEADER extern "C"{
|
|
#define LCUI_END_HEADER }
|
|
#else
|
|
#define LCUI_BEGIN_HEADER /* nothing */
|
|
#define LCUI_END_HEADER
|
|
#endif
|
|
|
|
#endif
|