PHG is a simple python script used to generate a set of useful macros used throughout all my projects, personalized with a custom prefix.
NOTE: All the macros are always defined so that they can be used as constant expressions in your code.
- Platform macros to distinguish Windows, Linux, macOS, iOS and Android
- Compiler macros to distinguish MSVC, GCC, Clang
- Architecture macros ti distinguish 64-bit and 32-bit targets
- Visibility macros to correctly export functions/classes from a dynamic library
- Utility macros for local declarations, unused variables or parameters, and asserts
- Features checking macro to conditionally enable custom features
- Write a proper help/usage message
- Add an usage example
- Report compiler version
- Support ARM architecture
It is licensed under the very permissive MIT License. For the complete license see the provided LICENSE file in the root directory.
Valentino "xpicox" Picotti for the *_IF_FEATURE macro trick.