2009-08-21 22:21:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD 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 GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2008-06-17 21:38:00 +02:00
|
|
|
/** @file endian_type.hpp Definition of various endian-dependant macros. */
|
|
|
|
|
2009-02-17 03:08:53 +01:00
|
|
|
#ifndef ENDIAN_TYPE_HPP
|
|
|
|
#define ENDIAN_TYPE_HPP
|
2008-06-17 21:38:00 +02:00
|
|
|
|
|
|
|
#if defined(ARM) || defined(__arm__) || defined(__alpha__)
|
2011-05-02 19:42:12 +02:00
|
|
|
/** The architecture requires aligned access. */
|
2020-07-02 23:36:10 +02:00
|
|
|
# define OTTD_ALIGNMENT 1
|
2008-06-17 21:38:00 +02:00
|
|
|
#else
|
2011-05-02 19:42:12 +02:00
|
|
|
/** The architecture does not require aligned access. */
|
2020-07-02 23:36:10 +02:00
|
|
|
# define OTTD_ALIGNMENT 0
|
2008-06-17 21:38:00 +02:00
|
|
|
#endif
|
|
|
|
|
2011-05-02 19:42:12 +02:00
|
|
|
/** Little endian builds use this for TTD_ENDIAN. */
|
2008-06-17 21:38:00 +02:00
|
|
|
#define TTD_LITTLE_ENDIAN 0
|
2011-05-02 19:42:12 +02:00
|
|
|
/** Big endian builds use this for TTD_ENDIAN. */
|
2008-06-17 21:38:00 +02:00
|
|
|
#define TTD_BIG_ENDIAN 1
|
|
|
|
|
Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2019-04-07 11:57:55 +02:00
|
|
|
#if !defined(TTD_ENDIAN)
|
|
|
|
# error "TTD_ENDIAN is not defined; please set it to either TTD_LITTLE_ENDIAN or TTD_BIG_ENDIAN"
|
|
|
|
#endif /* !TTD_ENDIAN */
|
2008-06-17 21:38:00 +02:00
|
|
|
|
|
|
|
#endif /* ENDIAN_TYPE_HPP */
|