diff --git a/docs/user-guide.md b/docs/user-guide.md index 37e2034..8d7376d 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -42,6 +42,9 @@ building the software were installed from that distribution unless otherwise specified. +The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE, +Cygwin, and Msys (MinGW) shells, using version 4.9.1 of the GNU toolchain. + 3. Tools --------- diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index f82ba53..5171ff0 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -346,9 +346,13 @@ $(ELF): $(OBJS) $(LINKERFILE) | bl$(1)_dirs @echo " LD $$@" +ifdef MAKE_BUILD_STRINGS + $(call MAKE_BUILD_STRINGS, $(BUILD_DIR)/build_message.o) +else @echo 'const char build_message[] = "Built : "$(BUILD_MESSAGE_TIMESTAMP); \ const char version_string[] = "${VERSION_STRING}";' | \ $$(CC) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o +endif $$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \ $(BUILD_DIR)/build_message.o $(OBJS) diff --git a/make_helpers/windows.mk b/make_helpers/windows.mk index 394df3a..8ac8246 100644 --- a/make_helpers/windows.mk +++ b/make_helpers/windows.mk @@ -91,3 +91,19 @@ endif +# Because git is not available from CMD.EXE, we need to avoid +# the BUILD_STRING generation which uses git. +# For now we use "development build". +# This can be overridden from the command line or environment. +BUILD_STRING ?= development build + +# The DOS echo shell command does not strip ' characters from the command +# parameters before printing. We therefore use an alternative method invoked +# by defining the MAKE_BUILD_STRINGS macro. +BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_TIMESTAMP}; +VERSION_STRING_MESSAGE = const char version_string[] = "${VERSION_STRING}"; +define MAKE_BUILD_STRINGS + @echo $$(BUILT_TIME_DATE_STRING) $$(VERSION_STRING_MESSAGE) | \ + $$(CC) $$(CFLAGS) -x c - -o $1 +endef +