summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorDhole <dhole@openmailbox.org>2015-06-24 17:46:28 +0200
committerPali Rohár <pali.rohar@gmail.com>2015-06-24 17:46:28 +0200
commit94a2fe0c17cac00c679cd08f9d8c3f6e78fa09a4 (patch)
treea8afd3ca5fcf45c3870dc1d9acf2360e3cd59c58 /src/Makefile
parent289d2f22b237e901853566c8588800ac9f189847 (diff)
download0xFFFF-94a2fe0c17cac00c679cd08f9d8c3f6e78fa09a4.tar.bz2
mangen: Set build date externally
Patch build system to allow the build date in the man entry to be set externally. In Debian it will be set to the latest debian/changelog entry for reproducibility.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile4
1 files changed, 3 insertions, 1 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