Commit a880d2d3 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Added automatically generated version banner

parent 4698fe29
bin.* bin.*
objs.* objs.*
deps.* deps.*
src/version.h
...@@ -122,7 +122,7 @@ ifeq ($(CFG),release) ...@@ -122,7 +122,7 @@ ifeq ($(CFG),release)
endif endif
@echo Built with RTEMS at ${RTEMS_LIB} for ${LEON}. @echo Built with RTEMS at ${RTEMS_LIB} for ${LEON}.
objs.$(SUFFIX)/%.o: %.c objs.$(SUFFIX)/%.o: %.c | src/version.h
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
ifeq ($(V),1) ifeq ($(V),1)
$(CC) -c $(CFLAGS) -o $@ $< $(CC) -c $(CFLAGS) -o $@ $<
...@@ -138,6 +138,16 @@ deps.$(SUFFIX)/%.d: %.c ...@@ -138,6 +138,16 @@ deps.$(SUFFIX)/%.d: %.c
sed 's,\($*\)\.o[ :]*,objs.$(SUFFIX)\/\1.o $@ : ,g' < $@.$$$$ > $@; \ sed 's,\($*\)\.o[ :]*,objs.$(SUFFIX)\/\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$ rm -f $@.$$$$
src/version.h: $(patsubst %, src/%, ${SRC}) Makefile
@/bin/echo -en '#ifndef __VERSION_H__\n' > $@
@/bin/echo -en "#define __VERSION_H__\n" >> $@
@/bin/echo -en 'const char version[] = "1.' >> $@
@git log --oneline | wc -l | tr -d '\n' >> $@
@/bin/echo -n " (" >> $@
@git log --oneline | head -1 | cut -d\ -f1 | tr -d '\n' >> $@
@/bin/echo ')";' >> $@
@/bin/echo -en "#endif\n" >> $@
clean: clean:
@rm -rf deps.* objs.* bin.* @rm -rf deps.* objs.* bin.*
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "version.h"
#include "system.h" #include "system.h"
void memcheck() void memcheck()
...@@ -32,6 +33,7 @@ void memcheck() ...@@ -32,6 +33,7 @@ void memcheck()
// Start at 512K. // Start at 512K.
size_t space = 512*1024; size_t space = 512*1024;
void *p = malloc(space); void *p = malloc(space);
printf("[BOARD TESTER, version %s - see https://goo.gl/GE51Db for details]\n", version);
printf("[MEMCHECK] Detecting available memory... "); printf("[MEMCHECK] Detecting available memory... ");
fflush(stdout); fflush(stdout);
while(p) { while(p) {
......
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