summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Makefile4
-rw-r--r--src/mangen.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index cad52e3..6b8ef08 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,11 +3,13 @@ include ../config.mk
PREFIX ?= /usr/local
INSTALL ?= install
+BUILD_DATE ?= $(shell LC_ALL=C date '+%b %e %Y')
+
CC = gcc
CROSS_CC = $(CROSS_COMPILE)$(CC)
HOST_CC = $(HOST_COMPILE)$(CC)
-CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L
+CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBUILD_DATE="\"$(BUILD_DATE)\"" -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L
CFLAGS += -W -Wall -O2 -pedantic -std=c99
LIBS += -lusb
diff --git a/src/mangen.c b/src/mangen.c
index d2bf89a..6f5a2fa 100644
--- a/src/mangen.c
+++ b/src/mangen.c
@@ -25,6 +25,10 @@
#define INFO NAME " \\- Open Free Fiasco Firmware Flasher, version " VERSION
#define DESCRIPTION "0xFFFF is Open Free Fiasco Firmware Flasher for Maemo devices. It support generating and unpacking FIASCO images on local computer. Useful for editing Maemo firmware package for future flash. It support via USB flashing any image type to Maemo device and also \"cold\" flashing which means flashing dead device with erased bootloader. There is support for booting kernel via USB without flashing to NAND and also changing configuration of Maemo device (enable/disable R&D mode, changing HW revision strings, ...).\n\n0xFFFF is alternative tool to proprietary Nokia flasher-3.5 and fiasco-gen. 0xFFFF generate compatible FIASCO images and also accept FIASCO images generated by Nokia fiasco-gen."
+#ifndef BUILD_DATE
+#define BUILD_DATE __DATE__
+#endif
+
int main() {
FILE * pipe;
@@ -34,7 +38,7 @@ int main() {
if ( ! pipe )
return 1;
- puts(".TH " NAME " 1 \"" __DATE__ "\" \"" NAME " " VERSION "\"");
+ puts(".TH " NAME " 1 \"" BUILD_DATE "\" \"" NAME " " VERSION "\"");
puts("");
puts(".SH NAME");