/*
 * Copyright (C) 2020-2021 Aloysius Indrayanto
 *
 * This file is part of the eCxx library, see LICENSE file for the license details.
 */


#ifndef ECXX_VERSION_H
#define ECXX_VERSION_H


//
// Define the eCxx library version numbers, suffix, and string
//
#define ECXX_LIBRARY_VERSION_MAJOR    1
#define ECXX_LIBRARY_VERSION_MINOR    0
#define ECXX_LIBRARY_VERSION_REVISION 8

#define ECXX_LIBRARY_VERSION_SUFFIX   "-vs"

#define ECXX_LIBRARY_VERSION_STRING   __ECXX_STRINGIFY(ECXX_LIBRARY_VERSION_MAJOR   ) "." \
                                      __ECXX_STRINGIFY(ECXX_LIBRARY_VERSION_MINOR   ) "." \
                                      __ECXX_STRINGIFY(ECXX_LIBRARY_VERSION_REVISION)     \
                                      ECXX_LIBRARY_VERSION_SUFFIX


//
// Define the compiler version string
//

// AVR
#ifdef __AVR_ARCH__
    #define ECXX_COMPILER_NAME "AVR GCC"
#endif

// NodeMCU-ESP8266
#ifdef __XTENSA__
    #define ECXX_COMPILER_NAME "Xtensa LX106 GCC"
#endif

// Define a generic compiler name for other platforms (e.g. for testing the eCxx library in the host PC)
#ifndef ECXX_COMPILER_NAME
    #define ECXX_COMPILER_NAME "GCC"
#endif

#define ECXX_COMPILER_VERSION_STRING ECXX_COMPILER_NAME                    " " \
                                     __ECXX_STRINGIFY(__GNUC__           ) "." \
                                     __ECXX_STRINGIFY(__GNUC_MINOR__     ) "." \
                                     __ECXX_STRINGIFY(__GNUC_PATCHLEVEL__)


#endif
