diff options
author | Gergő J. Miklós | 2020-10-10 23:26:19 +0200 |
---|---|---|
committer | Gergő J. Miklós | 2020-10-10 23:26:19 +0200 |
commit | 32094c850a92fbdc77b05f9d78cb35f385b44c2e (patch) | |
tree | 7a5a546647742dfd9d2fe2b593f1c4e84bbcd548 | |
parent | fb7772fdfc90c84f44d51398b20fec0d4e749345 (diff) | |
download | i2sensors-32094c850a92fbdc77b05f9d78cb35f385b44c2e.tar.gz i2sensors-32094c850a92fbdc77b05f9d78cb35f385b44c2e.zip |
versionstring
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/main.c | 8 |
2 files changed, 8 insertions, 3 deletions
@@ -1,6 +1,7 @@ CC = gcc ACC = arm-linux-gnueabihf-gcc -CFLAGS = -Wall +DATE = $(shell date "+%Y-%m-%d %H:%M:%S" ) +CFLAGS = -Wall -D"_BUILD_TIME_=\"$(DATE)\"" all: dir x86 ##copy @@ -20,7 +20,10 @@ #include "hmc5883.h" #define VERSION 1.27 - +#ifndef _BUILD_TIME_ + #define _BUILD_TIME_ __DATE__" "__TIME__ +#endif + // extern void lm75_print_help(void); // extern void lm75_read_all(const char *opts); // extern void lm75_read_one(const char *opts); @@ -29,6 +32,7 @@ // extern void hih61xx_read_one(const char *opts); + uint16 devicef; //# Bus-Device file uchar temp[256]; void (*print_all)(void) = NULL; @@ -57,7 +61,7 @@ void print_help(void) { " i2sensors read_all 1 lm75 0x4f \n" " i2sensors read_one 1 lm75 0x4f 00,-1.35\n" "\n" ); - printf ("Version: v%1.2f, build: [%s %s] (%s), TS: %s STDC: %d\n\n",VERSION,__DATE__,__TIME__,__VERSION__,__TIMESTAMP__,__STDC_VERSION__); + printf ("Version: v%1.2f, build: [%s] (gcc %s) \n\n",VERSION,_BUILD_TIME_,__VERSION__); } void bus_err(int ern){ |