Commit a880d2d3 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Added automatically generated version banner

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