From dd82c42588df4d0c70f325500b4b3cda8d5f4881 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 6 May 2019 15:37:40 +0200 Subject: [PATCH] fix #185 - Only -mno-ms-bitfields on MINGW (@doegox) --- client/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/Makefile b/client/Makefile index bc6770bb7..c9069a276 100644 --- a/client/Makefile +++ b/client/Makefile @@ -41,6 +41,8 @@ MV = mv ENV_LDFLAGS := $(LDFLAGS) ENV_CFLAGS := $(CFLAGS) +platform = $(shell uname) + VPATH = ../common ../zlib ../uart OBJDIR = obj @@ -55,11 +57,14 @@ CBORLIB = $(CBORLIBPATH)/tinycbor.a LIBS = -I../zlib -I../uart -I../liblua -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH) INCLUDES_CLIENT = -I. -I../include -I../common -I/opt/local/include $(LIBS) LDFLAGS = $(ENV_LDFLAGS) -CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -DPRESETS $(INCLUDES_CLIENT) -Wall -g -O3 -mno-ms-bitfields + +CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -DPRESETS $(INCLUDES_CLIENT) -Wall -g -O3 +ifneq (,$(findstring MINGW,$(platform))) + CFLAGS += -mno-ms-bitfields +endif CXXFLAGS = -I../include -Wall -O3 LUAPLATFORM = generic -platform = $(shell uname) ifneq (,$(findstring MINGW,$(platform))) LUAPLATFORM = mingw else