34 lines
934 B
C
34 lines
934 B
C
/*
|
|
* C Template - Main Example File
|
|
* This is a basic template file to demonstrate the project structure
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
// Include version header if it exists (will be auto-generated by build.sh)
|
|
#ifdef __has_include
|
|
#if __has_include("version.h")
|
|
#include "version.h"
|
|
#define HAS_VERSION
|
|
#endif
|
|
#endif
|
|
|
|
int main(void) {
|
|
printf("C Template Project\n");
|
|
printf("==================\n\n");
|
|
|
|
#ifdef HAS_VERSION
|
|
printf("Version: %s\n", get_version());
|
|
printf("Full Version: %s\n", get_version_full());
|
|
printf("Build Info: %s\n", get_build_info());
|
|
#else
|
|
printf("Version: Not available (run ./build.sh to generate version info)\n");
|
|
#endif
|
|
|
|
printf("\nThis is a template C project with automatic versioning.\n");
|
|
printf("Use ./build.sh to build the project and generate version information.\n");
|
|
|
|
return 0;
|
|
}
|