From f7f33f27322ee8247179ce4ca19d0d2cdb853285 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 26 Apr 2020 22:30:41 +0200 Subject: [PATCH] Revert "Makefile: move mingw defines to Makefile.host" This reverts commit 0665b3f40adf908f544f6c02f29455f953556fec. --- Makefile.host | 6 ------ tools/mfkey/Makefile | 7 +++++++ tools/nonce2key/Makefile | 7 +++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile.host b/Makefile.host index 9ef2685d2..9f5688939 100644 --- a/Makefile.host +++ b/Makefile.host @@ -17,12 +17,6 @@ endif CFLAGS ?= -Wall -Werror -O3 CFLAGS += $(MYDEFS) $(MYCFLAGS) $(MYINCLUDES) -ifneq (,$(findstring MINGW,$(platform))) - # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z) - # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1 - CFLAGS += -D_ISOC99_SOURCE - PM3CFLAGS += -mno-ms-bitfields -fexec-charset=cp850 -endif vpath %.c $(MYSRCPATHS) diff --git a/tools/mfkey/Makefile b/tools/mfkey/Makefile index df4e3cc54..fd69207a7 100644 --- a/tools/mfkey/Makefile +++ b/tools/mfkey/Makefile @@ -9,6 +9,13 @@ INSTALLTOOLS = $(BINS) include ../../Makefile.host +# checking platform can be done only after Makefile.host +ifneq (,$(findstring MINGW,$(platform))) + # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z) + # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1 + CFLAGS += -D_ISOC99_SOURCE +endif + mfkey32 : $(OBJDIR)/mfkey32.o $(MYOBJS) mfkey32v2 : $(OBJDIR)/mfkey32v2.o $(MYOBJS) mfkey64 : $(OBJDIR)/mfkey64.o $(MYOBJS) diff --git a/tools/nonce2key/Makefile b/tools/nonce2key/Makefile index 8b59d996d..a4b0bde05 100644 --- a/tools/nonce2key/Makefile +++ b/tools/nonce2key/Makefile @@ -9,4 +9,11 @@ INSTALLTOOLS = $(BINS) include ../../Makefile.host +# checking platform can be done only after Makefile.host +ifneq (,$(findstring MINGW,$(platform))) + # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z) + # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1 + CFLAGS += -D_ISOC99_SOURCE +endif + nonce2key : $(OBJDIR)/nonce2key.o $(MYOBJS)