Commit ff8de09e authored by Adam Wujek's avatar Adam Wujek

tools/ppsi_conf: add version information

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent e63c05d6
...@@ -10,6 +10,8 @@ OBJCOPY = $(CROSS_COMPILE)objcopy ...@@ -10,6 +10,8 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
include ../.config include ../.config
GIT_VER = $(shell git describe --always --dirty)
GIT_USR = $(shell git config --get user.name)
CFLAGS = -Wall -ggdb -I../include -I../arch-$(CONFIG_ARCH)/include CFLAGS = -Wall -ggdb -I../include -I../arch-$(CONFIG_ARCH)/include
PROGS = \ PROGS = \
...@@ -35,8 +37,13 @@ $(PROGS): $(wildcard *.h) $(wildcard ../include/ppsi/*.h) ...@@ -35,8 +37,13 @@ $(PROGS): $(wildcard *.h) $(wildcard ../include/ppsi/*.h)
ptpdump: dump-main.o dump-funcs.o ptpdump: dump-main.o dump-funcs.o
$(CC) $(LDFLAGS) dump-main.o dump-funcs.o -o $@ $(CC) $(LDFLAGS) dump-main.o dump-funcs.o -o $@
ppsi_conf: CFLAGS+=-I../arch-wrs/mini-rpc -L../arch-wrs/mini-rpc
ppsi_conf: LDFLAGS+=-lminipc ppsi_conf: LDFLAGS+=-lminipc
ppsi_conf: CFLAGS+=\
-I../arch-wrs/mini-rpc \
-L../arch-wrs/mini-rpc \
-D__GIT_USR__="\"${GIT_USR}\"" \
-D__GIT_VER__="\"${GIT_VER}\"" \
clean: clean:
rm -f $(PROGS) *.o *~ rm -f $(PROGS) *.o *~
......
...@@ -61,6 +61,8 @@ void help(char *prgname) ...@@ -61,6 +61,8 @@ void help(char *prgname)
" --priority2=<num> - set priority 2 to <num>\n" " --priority2=<num> - set priority 2 to <num>\n"
" --tracking=<on|off|enable|disable|1|0>\n" " --tracking=<on|off|enable|disable|1|0>\n"
" - enable/disable tracking in servo\n" " - enable/disable tracking in servo\n"
"\n\n"
"Version: " __GIT_VER__ " compiled by " __GIT_USR__ " on " __DATE__ ", " __TIME__ "\n"
); );
exit(1); exit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment