28 lines
No EOL
833 B
C
28 lines
No EOL
833 B
C
// define the version string and embed it into the binary
|
|
extern "C" const char TSEP_BINARY_VERSION[] = "TSEP_VERSION:" TSEP_VERSION;
|
|
|
|
#ifdef __linux__
|
|
#ifdef TSEP_SHARED_LIBRARY
|
|
|
|
// if TSEP_SHARED_LIBRARY is defined an entry point for a shared library will be defined
|
|
// which will print the binary infromation
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
extern "C" const char interp_path[] __attribute__((section(".interp"))) = "/lib64/ld-linux-x86-64.so.2";
|
|
|
|
extern "C" void tsep_version_entry_point()
|
|
{
|
|
printf(TSEP_PRODUCT_NAME " " TSEP_VERSION "\n");
|
|
printf(TSEP_COPYRIGHT "\n");
|
|
printf("Compiled by GCC %d.%d", __GNUC__, __GNUC_MINOR__);
|
|
#ifdef _DEBUG
|
|
printf(" (debug build)");
|
|
#endif
|
|
printf("\n");
|
|
exit(0);
|
|
}
|
|
|
|
#endif
|
|
#endif |