cbp2make
Makefile generation tool for Code::Blocks IDE
macros.h
Go to the documentation of this file.
1 /*
2  cbp2make : Makefile generation tool for the Code::Blocks IDE
3  Copyright (C) 2010-2013 Mirai Computing (mirai.computing@gmail.com)
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 //------------------------------------------------------------------------------
20 #ifndef MACROS_H
21 #define MACROS_H
22 //------------------------------------------------------------------------------
23 //------------------------------------------------------------------------------
24 #if defined(_APPLE_) || defined(_MACH_)
25 #define OS_MAC
26 #endif
27 
28 #if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
29 #define OS_WIN
30 #endif
31 
32 #ifndef OS_MAC
33 #ifndef OS_WIN
34 #define OS_UNIX
35 #endif
36 #endif
37 
38 #define SHOW_MODE_ONELINE
39 //#define TARGET_WDIR_ENABLED
40 
41 #ifndef NOMINMAX
42 #define NOMINMAX
43 namespace std {
44 
45 template <typename T1, typename T2>
46 inline T1 const& min (T1 const& a, T2 const& b)
47 {
48  return (((a)<(b))?(a):(b));
49 }
50 
51 template <typename T1, typename T2>
52 inline T1 const& max (T1 const& a, T2 const& b)
53 {
54  return (((a)>(b))?(a):(b));
55 }
56 
57 }
58 #endif
59 
60 #endif
61 //------------------------------------------------------------------------------
T1 const & max(T1 const &a, T2 const &b)
Returns maximal of two arguments.
Definition: macros.h:52
Namespace of C++ standard library.
T1 const & min(T1 const &a, T2 const &b)
Returns minimal of two arguments.
Definition: macros.h:46