From 9ca05bc0fa06ec515f06146b2d001d4db14537a1 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Sat, 22 Apr 2017 20:21:01 -0700 Subject: [PATCH] separate warnflags for c,c++ --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c624b56..40833be 100644 --- a/Makefile +++ b/Makefile @@ -53,13 +53,17 @@ TODAY = $(shell date "+%Y-%m-%d") ARCHFLAGS ?= -maes -mavx2 -mbmi2 #TODO ifeq ($(CC),clang) -WARNFLAGS += -Wgcc-compat +WARNFLAGS_C += -Wgcc-compat +endif + +ifeq ($(CXX),clang++) +WARNFLAGS_CXX += -Wgcc-compat endif ARCHFLAGS += $(XARCHFLAGS) -CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) -PUB_CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(PUB_INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) -CXXFLAGS = $(LANGXXFLAGS) $(WARNFLAGS) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCXXFLAGS) +CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(WARNFLAGS_C) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) +PUB_CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(WARNFLAGS_C) $(PUB_INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) +CXXFLAGS = $(LANGXXFLAGS) $(WARNFLAGS) $(WARNFLAGS_CXX) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCXXFLAGS) LDFLAGS = $(XLDFLAGS) ASFLAGS = $(ARCHFLAGS) $(XASFLAGS)