-
Notifications
You must be signed in to change notification settings - Fork 17
/
bmptk.h
54 lines (46 loc) · 1.73 KB
/
bmptk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//***************************************************************************
//
// file : bmptk/bmptk.h
//
// Copyright (c) 2012 ... 2015 Wouter van Ooijen ([email protected])
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// This is the one header file a user should include to use bmptk.
//
//***************************************************************************
#ifndef _BMPTK_H_
#define _BMPTK_H_
// ==========================================================================
//
// BMPTK_HERE debug macro
//
// ==========================================================================
//! file-name : line-number macro
//
//! The macro BMPTK_HERE tranlsates to a newline, the file-name, ":",
//! and the line-number of the place where the BMPTK_HERE macro
//! appears. This can be usefull for debug logging.
#define BMPTK_STRINGYFY( X ) #X
#define BMPTK_HERE2( F, L ) ( "\n" F ":" BMPTK_STRINGYFY( L ) " " )
#define BMPTK_HERE BMPTK_HERE2( __FILE__, __LINE__ )
// ==========================================================================
//
// include the target-specific header file(s)
//
// These macros are supplied by the makefile:
// BMPTK_INCLUDE_CHIP : the chip (register) definition files
// BMPTK_INCLUDE_BMPTK : the bmptk functional implementation (as yet empty)
//
// ==========================================================================
#define BMPTK_QUOTE( X ) BMPTK_STRINGYFY( X )
#ifdef BMPTK_INCLUDE_CHIP
#define register
#include BMPTK_QUOTE( BMPTK_INCLUDE_CHIP )
#endif
#ifdef BMPTK_INCLUDE_BMPTK
#include BMPTK_QUOTE( BMPTK_INCLUDE_BMPTK )
#endif
#endif // #ifndef _BMPTK_H_