diff options
-rwxr-xr-x | .nfs000000000004027700000003 | bin | 0 -> 21328 bytes | |||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cputemp2maxfreq.c | 2 | ||||
-rwxr-xr-x | generate_version_h.sh | 1 | ||||
-rw-r--r-- | version.c | 7 |
5 files changed, 10 insertions, 2 deletions
diff --git a/.nfs000000000004027700000003 b/.nfs000000000004027700000003 Binary files differnew file mode 100755 index 0000000..778e9c5 --- /dev/null +++ b/.nfs000000000004027700000003 @@ -1,4 +1,4 @@ -cputemp2maxfreq: version.h debug.o sysfs.o cpufreq.o failsafe.o +cputemp2maxfreq: version.o debug.o sysfs.o cpufreq.o failsafe.o version.h: generate_version_h.sh .git/index ./generate_version_h.sh > version.h diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c index 00d8f4f..20a3046 100644 --- a/cputemp2maxfreq.c +++ b/cputemp2maxfreq.c @@ -26,7 +26,7 @@ int main() long int diff; long int newfreq; - printf("Version %s, buildtime %s %s\n",VERSION_FULL,__DATE__,__TIME__); + printf("Version %s, buildtime %s %s\n",version(),__DATE__,__TIME__); // Print configuration printf("Configuration:\n"); diff --git a/generate_version_h.sh b/generate_version_h.sh index fed5fa0..75df5a2 100755 --- a/generate_version_h.sh +++ b/generate_version_h.sh @@ -8,3 +8,4 @@ echo "#define VERSION \"$VERSION\"" echo "#define HASH \"$HASH\"" echo "#define BRANCH \"$BRANCH\"" echo "#define VERSION_FULL VERSION\"-\"HASH\" (\"BRANCH\")\"" +echo "char* version();" diff --git a/version.c b/version.c new file mode 100644 index 0000000..d4f10ec --- /dev/null +++ b/version.c @@ -0,0 +1,7 @@ +#include "version.h" + +char* version() +{ + return VERSION_FULL; +} + |