mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
New stamp prepared
This commit is contained in:
parent
05fcb5047f
commit
7ca995bf9f
3 changed files with 16 additions and 5 deletions
15
src/Makefile
15
src/Makefile
|
@ -624,7 +624,7 @@ ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) $(AVRGCCFLAGS)
|
||||||
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
||||||
|
|
||||||
MAJ_VER = ${shell sh -c "grep \"MAJ_VERS\" open9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
|
MAJ_VER = ${shell sh -c "grep \"MAJ_VERS\" open9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
|
||||||
MIN_VER = ${shell sh -c "grep \"MIN_VERS\" open9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
|
MIN_VER = ${shell sh -c "grep \"MIN_VERS\" open9x.h | cut -d\ -f3"}
|
||||||
ABUILD_NUM = ${shell sh -c "grep \"BUILD_NUM\" stamp-open9x.h | egrep -o \"[[:digit:]]+\""}
|
ABUILD_NUM = ${shell sh -c "grep \"BUILD_NUM\" stamp-open9x.h | egrep -o \"[[:digit:]]+\""}
|
||||||
BUILD_NUM = $(shell echo $$(( $(ABUILD_NUM) + 1 )))
|
BUILD_NUM = $(shell echo $$(( $(ABUILD_NUM) + 1 )))
|
||||||
BUILD_DIR = $(shell pwd | awk -F'/' '{print $$((NF-1))}')
|
BUILD_DIR = $(shell pwd | awk -F'/' '{print $$((NF-1))}')
|
||||||
|
@ -638,7 +638,7 @@ endif
|
||||||
all: begin gccversion sizebefore build sizeafter end
|
all: begin gccversion sizebefore build sizeafter end
|
||||||
|
|
||||||
# Change the build target to build a HEX file or a library.
|
# Change the build target to build a HEX file or a library.
|
||||||
build: stamp font.lbm font_dblsize.lbm sticks.lbm s9xsplash.lbm elf hex eep lss sym
|
build: stamp_header font.lbm font_dblsize.lbm sticks.lbm s9xsplash.lbm elf hex eep lss sym
|
||||||
#build: lib
|
#build: lib
|
||||||
|
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ lib: $(LIBNAME)
|
||||||
|
|
||||||
|
|
||||||
# Build stamp-file
|
# Build stamp-file
|
||||||
stamp:
|
stamp_header:
|
||||||
@echo
|
@echo
|
||||||
@echo $(CPPSRC)
|
@echo $(CPPSRC)
|
||||||
|
|
||||||
|
@ -664,6 +664,13 @@ stamp:
|
||||||
@echo "#define SVN_STR \"$(BUILD_DIR)-r$(REV)\"" >> stamp-open9x.h
|
@echo "#define SVN_STR \"$(BUILD_DIR)-r$(REV)\"" >> stamp-open9x.h
|
||||||
@echo "#define MOD_STR \"$(MODS)\"" >> stamp-open9x.h
|
@echo "#define MOD_STR \"$(MODS)\"" >> stamp-open9x.h
|
||||||
@cat stamp-open9x.h
|
@cat stamp-open9x.h
|
||||||
|
|
||||||
|
stamp:
|
||||||
|
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-open9x.txt
|
||||||
|
@echo "#define TIME_STR \"`date +%H:%I:%S`\"" >> stamp-open9x.txt
|
||||||
|
@echo "#define VERS_STR \"$(MAJ_VER).$(MIN_VER)\"" >> stamp-open9x.txt
|
||||||
|
@echo "#define SVN_STR \"$(BUILD_DIR)-r$(REV)\"" >> stamp-open9x.txt
|
||||||
|
@cat stamp-open9x.txt
|
||||||
|
|
||||||
font.lbm: font_6x1.xbm
|
font.lbm: font_6x1.xbm
|
||||||
@echo
|
@echo
|
||||||
|
@ -928,7 +935,7 @@ $(shell mkdir $(OBJDIR) 2>/dev/null)
|
||||||
# Listing of phony targets.
|
# Listing of phony targets.
|
||||||
.PHONY : all begin finish end sizebefore sizeafter gccversion \
|
.PHONY : all begin finish end sizebefore sizeafter gccversion \
|
||||||
build elf hex eep lss sym coff extcoff \
|
build elf hex eep lss sym coff extcoff \
|
||||||
clean clean_list program debug gdb-config stamp
|
clean clean_list program debug gdb-config stamp_header
|
||||||
|
|
||||||
|
|
||||||
#### GOOGLE TESTS
|
#### GOOGLE TESTS
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#define gruvin9x_h
|
#define gruvin9x_h
|
||||||
|
|
||||||
#define MAJ_VERS 2
|
#define MAJ_VERS 2
|
||||||
#define MIN_VERS 0
|
#define MIN_VERS 00
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
4
src/stamp-open9x.txt
Normal file
4
src/stamp-open9x.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#define DATE_STR "2012-01-21"
|
||||||
|
#define TIME_STR "16:04:39"
|
||||||
|
#define VERS_STR "2.00"
|
||||||
|
#define SVN_STR "open9x-r99"
|
Loading…
Add table
Add a link
Reference in a new issue